Browse to parent, default to child
Permalink
Hi all, I apologize if this isn't the right place to post this question. I just started playing with c5 the other day to develop a personal website, and I'm loving it so far.
I'm trying to figure something out that's a little hard to explain... my current sitemap looks like this:
Home
-Blog
--Current Post
--Archives
-About
-Gallery
--Photos
--Screenshots
-Contact
--Email
--Forum
I noticed that when I look at the structure of the system pages, it's very similar:
Dashboard
-Sitemap
-File Manager
--Search
--Attributes
--Sets
etc.
When you're in the dashboard, if you click on say, the File Manager link, you are automatically brought to the Search page. Even though when you look at their addresses in the sitemap, they have their own distinct URLs - files and files/search.
How can I make my own custom pages behave this way? I realize I could just put the content of the first child into the parent, but the developer in me is just itching to find out a programmatic solution.
I'm trying to figure something out that's a little hard to explain... my current sitemap looks like this:
Home
-Blog
--Current Post
--Archives
-About
-Gallery
--Photos
--Screenshots
-Contact
--Forum
I noticed that when I look at the structure of the system pages, it's very similar:
Dashboard
-Sitemap
-File Manager
--Search
--Attributes
--Sets
etc.
When you're in the dashboard, if you click on say, the File Manager link, you are automatically brought to the Search page. Even though when you look at their addresses in the sitemap, they have their own distinct URLs - files and files/search.
How can I make my own custom pages behave this way? I realize I could just put the content of the first child into the parent, but the developer in me is just itching to find out a programmatic solution.
http://www.concrete5.org/index.php?cID=3396
Cheers.
Cheers.
Still learning Concrete5, but this is a method I used a couple months ago before edsalt posted the link above so thought I'd share in case anyone finds it useful... I had the same issue with a client's site and this is how I worked around it. I created a page in my themes folder called "page_redirect.php" that contains only PHP code to redirect to the page I want. (Using the header() tag, no design elements at all, just one line of PHP, but could have used javascript or anything else.) I then added a new Page Type to the system called Page Redirect with an alias of page_redirect. Then from the sitemap, clicked the parent page of the section, went to "Design" and selected my new "Page Redirect" type. Works perfectly. The main problem is that this is hard coded to a specific sub page so it's not flexible in any way, but it's easily reversible from the client's end if they want to change it in the future, I have instructed them to simply change the design back to Left Sidebar, then they can add content when they have some. I tried adding it as a Single Page, but it wouldn't let me.
Anyway, not a perfect long term solution, but works for now.
Anyway, not a perfect long term solution, but works for now.
both of those solutions are great guys, thank you
am i the only person who's ever tried to do this?