Support Center

Knowledgebase
View categorized listing of all common frequently asked questions.
Video Tutorials
Create a Movie & TV Show review website.
Customize the jReviews themes.
Review user profiles with the Everywhere addon.
Forum
Community forum
Submit a Ticket
Use your client area email to access the ticket system.
Downloads
Guides, modules and more...
 
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 06, 2009, 12:57:16 AM
22681 Posts in 5203 Topics by 2971 Members
Latest Member: twila
News: Use your client area email when you sign up to the forum so we can identify you as a trial or licensed user. Otherwise we may not answer your questions.
 
jReviews Support Forum  |  jReviews 1.x  |  Templates  |  How to create separate templates for each directory and how to load them? « previous next »
Pages: [1] 2 3 4
Author Topic: How to create separate templates for each directory and how to load them?  (Read 7431 times)
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« on: October 26, 2006, 05:40:59 PM »

I have a site in which each directory is a separate city page.  How do I create a separate city template or file and how to load it..I am using JReviews 1.1.4..Thanks
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8961


« Reply #1 on: October 26, 2006, 05:59:08 PM »

Have you read the help in the template manager for both the directory and category templates? The big help button has different info when you click on the category templates and directory templates buttons.

Also, read what is available so far in the documentation about customizing the templates.

If you can't get it to work at all, then post your specific questions here.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #2 on: October 26, 2006, 06:29:54 PM »

Thanks..I see the help info for the directory templates and categories...where is the documentation regarding customizing templates...thanks a ton...also..I saw info on using Google Map link conbining from custom fields...I see the code that you help user "jmsa2212" with..but where do I place this code?  will this link actually show in on the revew?...ie..if a user of mine adds a review of a restaurant but does not have the address, and the address is are custom fields, does think link allow them to look up the address???
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8961


« Reply #3 on: October 26, 2006, 06:34:21 PM »

Thanks..I see the help info for the directory templates and categories...where is the documentation regarding customizing templates...

Click on the documentation link on the Support menu on the top-left of this site and you will find it.

Quote
I saw info on using Google Map link conbining from custom fields...I see the code that you help user "jmsa2212" with..but where do I place this code?  will this link actually show in on the revew?...ie..if a user of mine adds a review of a restaurant but does not have the address, and the address is are custom fields, does think link allow them to look up the address???

You can place that code in the com_content.html template. What it will do is that if you have custom fields named like the variables in the example it will create a link to the google map with that address. So basically, you can show the address in the content and you have an automatic link created to google as well. I don't think it does what you are describing, the address has to be filled in.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #4 on: October 26, 2006, 06:43:34 PM »

so placing this code will allow a user to find the address of the review item via google?..i.e...a user is looking a review of a restaurant with the name and address of the restaurant...does this code with correct variables allow searching for the address...thanks a ton...
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8961


« Reply #5 on: October 26, 2006, 09:37:33 PM »

With this code you will get a link like this:

maps.google.com/maps?q=12%20south%20russell%20st,boston,ma+02114

click on it and that's what will happen Smiley
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #6 on: October 28, 2006, 12:45:50 PM »

My link is not working on my page....the variables..do use the fieldnames or the title names?

and also..example..I have the following field names for restaurants..

"jr_restaurantaddress"
"jr_restaurantcity"
"jr_restaurantstate"
"jr_restaurantzip"

when placeing this code on the com_content.html template..do I have to put theses field in twice..
ie "jr_restaurantaddress.jr_restaurantaddress"


Also..becasue I have about 17 different group names with distinct custom fieldnames..how can I have the google link still work no matter which review (group type of review) is being displayed?


Thanks a ton Smiley
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8961


« Reply #7 on: October 28, 2006, 06:43:12 PM »

The reason you see the variable repeated twice is because it's a copy from another template. You don't necessarily need to do this, just create your link like this:

Quote
<a href="htt.p://maps.google.com/maps?q={JR_RESTAURANTADDRESS},{JR_RESTAURANTCITY},{JR_RESTAURANTSTATE}+{JR_RESTAURANTZIP}">My map link</a>

Remove the dot from the htt.p!

Once that works, you can wrap it between:
Quote
<patTemplate:tmpl name="googlemaplink" type="simplecondition" requiredvars="jr_restaurantaddress,jr_restaurantcity,jr_restaurantstate,jr_restaurantzip">
ABOVE CODE
</patTemplate:tmpl>

This last part is so that nothing is shown if any of the variables are empty.

If you have address fields in all those groups then you are better off just having a single group with the address fields and assigning it to all the categories. That's what groups are for, so you can reuse them across categories.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #8 on: October 29, 2006, 09:51:01 AM »

 I am getting this error.....pat-Error Attribute 'requiredvars' missing for googlemaplink in com_content.html on line 18

and since I have 17 groups with distinct custom address field names...how do you recommend placing them in the google link code so that no matter which type of review is displayed..the link stil works..

Thanks
Logged
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #9 on: October 29, 2006, 10:14:53 AM »

Its working now.with this code

Quote
<a
href="http://maps.google.com/maps?q={JR_RESTAURANTADDRESS},{JR_RESTAURANTCITY},{JR_RESTAURANTSTATE}+{JR_RESTAURANTZIP}">Get Directions and Map It</a>
<patTemplate:tmpl name="googlemaplink" type="simplecondition" requiredvars="jr_restaurantaddress,jr_restaurantcity,jr_restaurantstate,jr_restaurantzip">
<a
href="http://maps.google.com/maps?q={JR_RESTAURANTADDRESS},{JR_RESTAURANTCITY},{JR_RESTAURANTSTATE}+{JR_RESTAURANTZIP}">Get Directions and Map It</a>
</patTemplate:tmpl>

Because I have 17 groups with distinct address field names..do i have to include all the distinct custom fields names in the brackets...ie...{JR_SHOPPINGADDRESS}..ect..as well as include all the field namse in the "requiredvars=....."

Any help would be great...and how do I have a separate window load when this link is click..right now it is taking my users away from my site and to google.....thanks


Thanks Smiley Smiley
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8961


« Reply #10 on: October 29, 2006, 10:29:12 PM »

Why do you have 17 groups with the same fields? That is what I tried to get at before. If you are using all of them on the same page, then yest, you need to repeat the code 17 times. If each group is assigned to a different category (i.e. restaurants, shopping), then you didn't have to create 17 groups in the first place. You could have separated the address information into one group and used it for all the categories.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #11 on: October 30, 2006, 06:03:40 AM »

Thanks..looks like I created more work for myself...so with putting all the coded 17 times..do I put it all in 1 statement or do I need to place it on the page via 17 small segments..each for the 17 groups...also...how can I have the google map open up a separate page as opposed to taking my users to the google site and leaving my site?

Thanks Smiley
Logged
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #12 on: October 30, 2006, 06:21:41 AM »

Or can I deleted the address, city, state, and zip custom fields for the 17 groups and create a new groups with these custom fields and assign the categories....will this corrupt database or mess up the new item form...or mess up anything...thanks
Logged
Alejandro
Global Moderator
Administrator
Hero Member
*****
Offline Offline

Posts: 8961


« Reply #13 on: October 30, 2006, 06:26:59 AM »

1. If you keep what you have, just repeat the code with the names of the new fields
2. To open a new window add target="_blank" in the <a> tag: <a taget="_blank" href=xxx>your text</a>
3. If you delete the fields, any data you have already saved on those fields will be lost. If that's not a problem, you can delete them, create the new group and add it to the criterias.
Logged

Please take the time to vote and to write a review: http://extensions.joomla.org
Reviews Ahoy! - Submit your jReviews site here.
chuckwilliams10
Jr. Member
**
Offline Offline

Posts: 43


« Reply #14 on: October 30, 2006, 08:16:29 AM »

Thanks for info on opening a new window.. Smiley

So copying the code for the 17 different groups for the map link to work..
with the above "restaurant fields" and the 16 other groups with distinct custom fields how to incorporate that into the code..

IE..some of the fileds.."jr_restaurantaddress","jr_restaurantcity","jr_restaurantstate","jr_restaurantzip,"jr_shoppingaddress","jr_shoppingcity","jr_shoppingstate","jr_shoppingzip"...............(the other custom fields)

How do I incorporate all the fields that that the map link works no matter which review of a group displays.
Logged
Pages: [1] 2 3 4
« previous next »
    Jump to: