Changing menus and templates based on the page I come from..

The place to talk about things that are related to CMS Made simple, but don't fit anywhere else.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Changing menus and templates based on the page I come from..

Post by Andrew Prior »

Imagine I have a series of articles on American State capital cities...

Then imagine I have another series on the great cities of America, which will, of course, include some cities from the first list.

I can link to the state capitals which are also great cities from my great cities page using an internal page link. The problem, of course is that if you go to a state capital from the great cities page, you get the state capital's menu and template, not the great cities navigational menu.

I could solve this by duplicating pages, but that is hardly good practice!

Any ideas how one could change that menu and template on the fly; that is, recognise that the reader has clicked on the internal page link for great cities and is not browsing the state capitals? How do we set navigation based on the page a person came from rather than the page they arrive at? Out of my depth here...
Andrew
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Changing menus and templates based on the page I come fr

Post by calguy1000 »

I don't think you want to do that. for seo and other purposes. Remembering that people not only navigate to a page, but they also bookmark it and share links. also search engines crawl your site.

If you have pages like:

Fruits (fruit template)
- Apple (page, fruit template))
- Orange (page, fruit template)
- Tomato (page, fruit template)

Vegetables (page, veggie template)
- Carrot (page, veggie template)
- Celery (page, veggie template)
- Tomato (links to the Fruits Page)

There is only one page, and one page hierarchy to the tomato page. so there will be no extra content on that page dependent on how they browsed to it. The user, or the search engine could come back to the page 3 months later, in which case the browsing information is irrelevant. And you still don't want duplicate content.

What you could do is some way of linking back to the parent(s) in some way.
i.e: This page is a 'Fruit' (links to the fruits page) and is also considered by some to be a 'Vegetable' (link to the vegetables page). which gives you the reverse navigation you may want.

Maybe a oneline content block like: 'related pages' with content like 'fruits,vegetables'. then you could use Menumanager to create a simple navigation to these pages.

The 'tomato' page would be displayed using the 'fruit' template but would provide links back to both the fruit, and vegetable parents.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Changing menus and templates based on the page I come fr

Post by Rolf »

Have you tried to achieve this with a module. It looks to me similar as http://www.cmscanbesimple.org/blog/buil ... ade-simple
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Re: Changing menus and templates based on the page I come fr

Post by Andrew Prior »

Thanks Calguy... some good thoughts there.
Post Reply

Return to “The Lounge”