Peter Troeger Posted March 23, 2016 Share Posted March 23, 2016 Hello maybe someone can help me with my problem. I'm creating a parent page where I define things like header information, slider images, introduction-text... The content of this parent page is generated by creating child pages. But each child is not supposed to have it's own page/url. I just want the children to be part of the parent page (which they are already doing). But, I don't want the child pages to be accessible via their own url. And I don't know how to achive this. I have, for example, a parent page called TEAM. I have created the child pages TEAM-MEMBER-1 and TEAM-MEMBER-1. In the front-end page http://url.com/team is rendered fine with the contents from TEAM-MEMBER-1 and TEAM-MEMBER-1. But the pages http://url.com/team/team-member-1 and http://url.com/team/team-member-1 are also accessible, which I don't want. Any one know what to do? I hope I was able to get my point across. Thanks! Peter Link to comment Share on other sites More sharing options...
kongondo Posted March 23, 2016 Share Posted March 23, 2016 (edited) Hi Peter, There's various techniques to solve this: Don't give the template of team-member-1 (the child pages) a template file. And decide what to do when that URL is accessed Don't give 'guest' view access (in template file of the child pages) and tell PW what to do when those child pages are accessed - e.g. redirect to some URL In the template file of child pages, use $session-redirect('/some-url/') to redirect users to the parent page Etc...(aka - please search - this has been covered a lot in the forums) Edited March 23, 2016 by kongondo 2 Link to comment Share on other sites More sharing options...
Peter Troeger Posted March 23, 2016 Author Share Posted March 23, 2016 Hi kongondo, thanks for the tips. 1. I want the content to be displayed in a certain way and am using the template file so I can just render the child pages in the parent page. 2. When I don't allow guests to view the page it is not displayed in my parent page anymore. I tried redirecting the URL via the redirect module, but it ignores it and still displays the page. 3. When doing this, I get an error for too many redirects 4. I didn't know that to search for, that is my problem :/ Any tipps, then I will do some more research. Thanks! Peter Link to comment Share on other sites More sharing options...
kongondo Posted March 23, 2016 Share Posted March 23, 2016 (edited) Aah, I see. If you need to use the template file of the child pages, have a look at this long thread. @jonathan's post may be of special interest in your case. You do not need to use the redirect module for such a simple redirect. For such you use $session->redirect('url') like I indicated . Have a read here about the session variable. Edited March 23, 2016 by kongondo 3 Link to comment Share on other sites More sharing options...
Peter Troeger Posted March 23, 2016 Author Share Posted March 23, 2016 Thanks kongondo! I think that post is exactly what I need to look at. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now