Customization of “restricted access” redirect page ?
Posted: 29 July 2004 02:46 AM   [ Ignore ]  
Grad Student
Rank
Total Posts:  67
Joined  05-13-2004

Hi !

For each template, we can specify which member groups can have access to the rendered page. When some groups are not allowed to see the page, we can then specify the template to which they will be redirected.

That’s fine.

What would be even better is a way to specifiy in the “redirect template” from which template was the access forbidden, so that we can have a way to show appropriate information accordingly.

Is there a way to do that or shall I ask it as a Feature Request ?

Profile
 
 
Posted: 30 July 2004 02:00 AM   [ Ignore ]   [ # 1 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  7534
Joined  08-05-2002

Since the “redirect template” is simply loaded in place of the template requested, you can use the {segment} globals to do access the URL parts.

For http://www.yoursite.com/index.php/research/restricted/, you could use {segment_2} to see that it is the ‘restricted’ template being requested.  So, people who are not allowed to view that template can have a “redirect template” of weblog/no_access and inside that template can be something like this:

“You have been denied access to the {segment_2} page in the {segment_1} section of our site.”

Which would be translated into:

“You have been denied access to the restricted page in the research section of our site.

 Signature 
Profile
 
 
Posted: 30 July 2004 07:09 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Rank
Total Posts:  67
Joined  05-13-2004

All right, Paul.

Well if I understand what you say, I have to create as many “restricted” templates as I have of templates whose access can be restricted.

I was just lazy enough to think that I would have one “restricted” template and pass it information in the {segment_3} on whose was calling it.

So the real question was : how do you add a segment_3 to the restricted template selection ?

Profile
 
 
Posted: 30 July 2004 08:49 AM   [ Ignore ]   [ # 3 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  9868
Joined  06-19-2002

No, with Paul‘s suggestion above you would only be redirecting to a single Template which would have the code he posted.  That Template would automatically display the information as he indicated.  Go ahead and test it out yourself.

 Signature 

Chris Curtis
chriscurtis.org

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65087 Total Logged-in Users: 37
Total Topics: 82226 Total Anonymous Users: 22
Total Replies: 441924 Total Guests: 211
Total Posts: 524150    
Members ( View Memberlist )