Page 1 of 1

Content Internal Page Link Urls

Posted: Sat Oct 03, 2009 11:08 pm
by 180michael
Hello,

This is most likely an easy question to answer but I wasn't sure how to search for it, so I found nothing.

When using pretty urls and a top page in the content structure is an Internal Page Link to it's first child how do I keep it from rendering as a page if its alias is used in address bar?

Example:

Say you have menu structure as:

1. Home Page
2. Second Page (just Internal Link Page)
    2.1 Sub Child (linked to this page)
    2.2 Another child page.
3. Something else
...

So the menu on the site (1 level deep) would show page 2. and it would be linked to page 2.1. It's url might look like http://www.example.com/second-page/sub-child. This all works fine, but if I were to go directly to http://www.example.com/second-page it renders a page with no content. How can I have that page redirect to the linked page it's supposed to?

Thanks!

Re: Content Internal Page Link Urls

Posted: Mon Oct 05, 2009 2:17 pm
by Rolf
Hi 180michael

Change the content-type of the 'second page' back to 'Content'
Put in the content block:

Code: Select all

{redirect_page page='sub-child'}
Hope this helps,

®olf

Re: Content Internal Page Link Urls

Posted: Mon Oct 05, 2009 2:48 pm
by Rolf
Solution above is a temporarily solution.

Made a bug report on this. Calguy1000 will look into it and fix it before release 2.0
http://dev.cmsmadesimple.org/bug/view/4138

Rolf

Re: Content Internal Page Link Urls

Posted: Mon Oct 05, 2009 4:01 pm
by 180michael
Thank you Rolf. That seems to be a viable solution but I'm wondering where I should place this code since the internal link page does not contain content areas of its own. Or were you suggesting turning the page into a normal content page and using that to redirect to the sub-child?

Re: Content Internal Page Link Urls

Posted: Mon Oct 05, 2009 4:15 pm
by Rolf
Or were you suggesting turning the page into a normal content page and using that to redirect to the sub-child?
Yes, I did.  ;)

Re: Content Internal Page Link Urls

Posted: Tue Oct 27, 2009 12:58 pm
by cockydays
Until this is fixed, is the only solution to create a content page and use the redirect tag, or can this be done in .htaccess?
I think that would be a more pretty solution (until fixed anyway)..

Re: Content Internal Page Link Urls

Posted: Tue Oct 27, 2009 1:51 pm
by Rolf
cockydays wrote: Until this is fixed, is the only solution to create a content page and use the redirect tag, or can this be done in .htaccess?
When a page isn't visible in the navigation, creating a 301 redirect in the .htaccess file is the best solution.
But if the internal page link has to be visible in the menu, you have to use this temporarily workaround... And thats the case here I think.  ;)

Regards Rolf

Re: Content Internal Page Link Urls

Posted: Wed Oct 28, 2009 12:46 pm
by cockydays
Ok, thanks!  :)