Content Internal Page Link Urls

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
180michael
Forum Members
Forum Members
Posts: 27
Joined: Fri Dec 26, 2008 9:29 pm

Content Internal Page Link Urls

Post 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!
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Content Internal Page Link Urls

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Content Internal Page Link Urls

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
180michael
Forum Members
Forum Members
Posts: 27
Joined: Fri Dec 26, 2008 9:29 pm

Re: Content Internal Page Link Urls

Post 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?
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Content Internal Page Link Urls

Post 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.  ;)
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
cockydays
New Member
New Member
Posts: 2
Joined: Thu Oct 15, 2009 1:05 pm

Re: Content Internal Page Link Urls

Post 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)..
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Content Internal Page Link Urls

Post 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
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
cockydays
New Member
New Member
Posts: 2
Joined: Thu Oct 15, 2009 1:05 pm

Re: Content Internal Page Link Urls

Post by cockydays »

Ok, thanks!  :)
Post Reply

Return to “CMSMS Core”