Hello,
I’m new to MODx.
So far I’m quite impressed but there are some areas that I’m still struggling to understand.
For example how would I go about having document of id 5 display the document of id 10 (including the template?
To make it more clear..
I have this menu
Home | Projects | Services | Contacts Us
Under ’Projects’ there’s more choices you can make: North America | South America | Europe
When they click on the actual region link like Europe for example it’s all good.
But when somebody clicks on "Projects" I want them to go to "North America" section.
I know there must be a really simple solution for this but just can’t find the answer to this.
Mike
Mike, I think you would go to "Resources" and "Template Variables."
1. Create a new template variable, name it something like [*NorthAmerica*]
2. In the Default Value box, place @DOCUMENT 11 (or whatever number the page you want it to go to - is.) Then press save.
3. Clone the template you are using. Edit it and take out the [*content*] tag and replace it with [*NorthAmerica*] Save it.
4. Set that particular page (the projects page) to use the cloned template.
Let me know if that makes sense, and if someone has an easier way, please correct me.
- John
If you have a your "Projects" document set as a conatiner as well and have North America, South America, Europe ... as children.
Then use the [[FirstChildRedirect]] snippet. You won’t be able to go to the projects page to see the content. I have used it to make WayFinder for navigation sections with overviews as the first section.
DropboxUploader -- Upload files to a Dropbox account.
DIG -- Dynamic Image Generator
gus -- Google URL Shortener
makeQR -- Uses google chart api to make QR codes.
MODxTweeter -- Update your twitter status on publish.
Thank you both for replying!
[[FirstChildRedirect]] worked beautifully!
@DOCUMENT worked as well but the problem with that was that the menu did not highlight
the "North America" section. So the user wouldn’t know which section they’re in.
Again, thank you both for the help.
Mike