Menumenumenu
Permalink 4 users found helpfulHard to explain, but check here;
http://www.balticjazz.com/english/press-media.php...
When you click "Press" in the main menu it goes straight to Press>Media and not just any Press-site.
I don't know any other CMS where this is possible dynamically but if there's someway doing it with concrete it would be PERFECT!!
I hope it's possible because I've done three websites with navigation this way and I'll rebuild them all with Concrete when/if this is possible.
If you have this in your site
About
Product 1
Product 2
History
Something
Whatever
and you want, when clicking on About, to go to Product 1 instead of About, this will give you what you want. It does so by linking you directly to /about/product1/. If you manually go to /about/, you will not be forwarded on to product1/ (just so you know).
To get this to work, do the following.
1. go into the dashboard, and create a page attribute with the handle "replace_link_with_first_in_nav." Make sure this page attribute type is a check box.
2. Go the page you want to jump FROM (in your example Press, I believe) and add the page attribute to the page, and turn it on.
From then on, whenever press is listed in the nav, clicking on it should take you to the first child of Press, rather than press itself.
Now we have a stable 5.3, are parameters like these working now? Is there somewhere a help page on this?
Are there other page attributes that are hidden but actually working?
however, on my site not only do i need it to jump to the immediate child page but sometimes even to the child's child...
so, in my case for a art gallery website, the set up is as follows
Exhibitions
–Past
--past1
--past2
--past3
-future
--future1
-present
--present1
So the handle "replace_link_with_first_nav" works great to click on "past" and land on the first past exhibition, and the same for the other two.
What i'd like though is the ability for "exhibitions" to land on one of the grandchildren. i.e Exhibitions would take you to the third hierarchy.
Is there a handle like "replace_link_with_first_nav" that could do this?
THANKS
That way, you don't have to create a landing page for every sub nav, or a menu system that has duplicate links.
As in the case above, every time a sub nav is further divided, the problem is recreated, so that the 1st child of the sub nav still remains a landing page.
I guess it would require applying this code to a page list template, but i'm not sure where
<?php if ($_c->getCollectionAttributeValue('replace_link_with_first_in_nav')) { $subPage = $_c->getFirstChild(); if ($subPage instanceof Page) { $pageLink = $nh->getLinkToCollection($subPage); } } ?>
This post has been a huge help as I have been trying to work out how to do this for some time.
I was just curious what other tricky little built in functions like this are in Concrete5 and not very well documented at this stage.
I know it is a big ask and I love the CMS one way or the other but it would be great to see a little cheat sheet page made with these sort of tricky little functions for ongoing reference.
Just a thought and I don't mean to be asking for massive work hours by someone else, I am a little new to this CMS and love all these built in features, just can't seem to find theme on my own.
:-)
Thank you again for this great solution.
I am on version 5.3.3.1
I added a page attribute with the handle AND name: replace_link_with_first_in_nav
I made it a "checkbox" type, as instructed.
I applied it to the Parent element "Print."
As you can see, it does not redirect to the first child:
http://php.22graphics.com/print/...
i really need to have it when you click on projects(top menu) it take you to residential/project1, currently replace_link_with_first_in_nav will take me to residential, but i want it to take me a step further. can anyone help with this?
getLastchild see documentation herehttp://users.etu.info.unicaen.fr/~jacques/phpdom/apidoc/Node.html#f...
is there anyway of adding the corect code to the view.php of autonave that will make this work?
$pageLink = false; if ($_c->getCollectionAttributeValue('replace_link_with_first_in_nav')) { $subPage = $_c->getFirstChild(); if ($subPage instanceof Page) { $pageLink = $nh->getLinkToCollection($subPage); }
i just want it to repeat this function so it pushes you down "two" child pages...
any ideas anyone?
To add the attribute, Click the Pages & Themes button on the left of the dashboard, then click the Page Types tab at the top of the next screen, then click the Add Attribute button on the bottom.
Then, go to the page you want to redirect, click Properties and add the new Attribute from the dropdown menu. Then, click the little checkbox that appears "Yes." Once you select it, voila, it will redirect to the first child.
In order for this to work I think it has to be a Parent with Children (ie. it must be a yellow folder with contents inside if you're viewing Sitemap). Maybe not, maybe otherwise it will just jump to the next page in the page order.
If you didn't figure it out, I think what I'm going to do is apply the replace_with_first_in_nav to 2 pages in a row so it will hopefully skip one and then the other.
They wanted the contact page to go directly to a sub page like so.
contact when clicked goes to contact > about.
So all you have to do is create the page attribute (use the check box)
replace_link_with_first_in_nav
Then go to the contact page and then click page properties and then use the attribute "replace_link_with_first_in_nav" and checkmark that.
And publish your edits.
It should work.
If not just PM and we'll figure something out.
Btw, the other option didn't work, so now I've started a new thread.
so like
About
Our History
Press
Contact
Products
Services
but when I click on about, i get dumped to our history?
That's doable, but it probably means messing around with some template files.
does the navigation ALWAYS behave that way? (for example, is there a product page, or does clicking product above take me to the first product)