pages underneath external link
Permalink
I thought I've asked that before but couldn't find anything..
I've got a structure like this:
/en/products/ (external link to product_1)
/en/products/product_1/
/en/products/product_2/
products has no content. It should open the first product page (product_1). This works with external links, but there are two problems:
1. the address of product is /product_1 and not /en/products/product_1/ and also not /en/product_1/
2. as already mentioned here:http://www.concrete5.org/community/forums/usage/add_home_page_to_na... . It's not possible to use the css class on the external link to highlight it..
I'm not sure if Swiss people build different websites but in about 30% of all websites I've built there is an "empty" folder that should link to the first subpage...
I've got a structure like this:
/en/products/ (external link to product_1)
/en/products/product_1/
/en/products/product_2/
products has no content. It should open the first product page (product_1). This works with external links, but there are two problems:
1. the address of product is /product_1 and not /en/products/product_1/ and also not /en/product_1/
2. as already mentioned here:http://www.concrete5.org/community/forums/usage/add_home_page_to_na... . It's not possible to use the css class on the external link to highlight it..
I'm not sure if Swiss people build different websites but in about 30% of all websites I've built there is an "empty" folder that should link to the first subpage...
FYI: getCollectionPath doesn't work since external pages don't generate a directory structure...
I got rid of all the external links
/en/products (shows first child - product_1)
/en/products/product_1
/en/products/product_2
I've added a page attribute which you can set to true. In case it's true, the autonav template I've attached shows the first child instead of the current page.
Works fine so far!
/en/products (shows first child - product_1)
/en/products/product_1
/en/products/product_2
I've added a page attribute which you can set to true. In case it's true, the autonav template I've attached shows the first child instead of the current page.
Works fine so far!
I could see us incorporating this. I think we might change the handle that you're checking though to something like "replace_with_first_child" so it's a little bit clearer that it's grabbing the subpage, but so far this looks like a great way to solve this problem.
I even mixed that on my sites /-:
On one it's called show_next_link and in the other one it's called show_first_child
I'm fine with whatever word you pick, having that feature in the core would be awesome!
On one it's called show_next_link and in the other one it's called show_first_child
I'm fine with whatever word you pick, having that feature in the core would be awesome!
this solution has one problem. When you try to add a new subpage ("Add Page") it gets a bit complicated..
since you don't have a parent, it's not possible to add a child page underneath it... you have to use the sitemap.
Or you would have to add a second button "Add sibling page" (I'm not sure if sibling is the right word to explain this...)
Beside the now available "Add (child) page" a function that creates a page on the same level....
since you don't have a parent, it's not possible to add a child page underneath it... you have to use the sitemap.
Or you would have to add a second button "Add sibling page" (I'm not sure if sibling is the right word to explain this...)
Beside the now available "Add (child) page" a function that creates a page on the same level....
Hi Remo,
I read the article you referenced, but wasn't too clear on how you solved the problem.
I understand that you can use "replace_link_with_first_in_nav" checkbox for the autonav on top menu to link to a subnav. But wasn't too clear on linking the top menu to the children of the subnav (aka grandchildren/third tier).
To make things more complicated, what would happen if the client wanted to switch the order of the pages? So top menu can virtually link to any of the pages in the third tier. Look below, and i can demonstrate.
I too have a similar structure to above:
Home
Projects
- Aged Care
---- Blue Care
- Education
---- This is the third tier.
About Us
Contact Us
I would like Projects to link to Blue Care, but the client can add as many projects as they want, and because they can change the order in the subnav( i am using autonav here), hence the top menu should also change to link to the first project on that section.
I read the article you referenced, but wasn't too clear on how you solved the problem.
I understand that you can use "replace_link_with_first_in_nav" checkbox for the autonav on top menu to link to a subnav. But wasn't too clear on linking the top menu to the children of the subnav (aka grandchildren/third tier).
To make things more complicated, what would happen if the client wanted to switch the order of the pages? So top menu can virtually link to any of the pages in the third tier. Look below, and i can demonstrate.
I too have a similar structure to above:
Home
Projects
- Aged Care
---- Blue Care
- Education
---- This is the third tier.
About Us
Contact Us
I would like Projects to link to Blue Care, but the client can add as many projects as they want, and because they can change the order in the subnav( i am using autonav here), hence the top menu should also change to link to the first project on that section.
this is something different. As the attribute handle says "replace link with first item in navigation", it only replaces the current page with its first child.
In case of projects that would be "Aged Care". You need an external page link for this, but you would have to add the link manually.
Or create a new attribute type "Page" that lets you select a page within properties.. But that takes more than a minute.
In case of projects that would be "Aged Care". You need an external page link for this, but you would have to add the link manually.
Or create a new attribute type "Page" that lets you select a page within properties.. But that takes more than a minute.
Thanks for the response Remo, i was wondering where every1 went.. anyways i figured it out by just reusing the replace_link_with_first_in_nav function that was written there.
Hi Remo
Sorry I'm totally new to this as I've just started using C5.
Could you or some please explain to me what I need to do with the file Remo attached. I've created the page attribute which I've set to the top level of the section, but when I click that link it still remains the same.
Thanks
Sorry I'm totally new to this as I've just started using C5.
Could you or some please explain to me what I need to do with the file Remo attached. I've created the page attribute which I've set to the top level of the section, but when I click that link it still remains the same.
Thanks
Remo, this is an extremely valid point. Were you able to implement any sort of solution that checks the current external link to see if it has children. I have not looked recently into whether or not an external link can return this information when customizing the autonav.
If I remember correctly, that post is pretty old, we've decided to use a normal page with a custom URL external link which produces an external link. We've basically rebuilt the functionality on top of normal pages.
It takes a few more steps to create an external link and feels very hacky, but it works.
It takes a few more steps to create an external link and feels very hacky, but it works.
your permission inheritance method removes all the permissions on the page when moved underneath a folder..
can be fixed manually!