[Typo3-dev] Display page in menu, regardless of login status.

Kasper Skårhøj kasper2005 at typo3.com
Fri Oct 7 10:40:54 CEST 2005


Hi Keith,

If this is not already in TSref I apologize that I didn't publish it yet - will do so today maybe.

For the menu objects (eg. TMENU/GMENU) you have this property to set in TypoScript, that is what I referred to 21/4 this year:

<snip>
showAccessRestrictedPages
integer (page id) / keyword “NONE”
If set, pages in the menu will include pages with frontend user group access enabled.  However the page is of course not accessible and therefore the URL in the menu will be linked to the page with the ID of this value. On that page you could put a login form or other message.
If the value is “NONE” the link will not be changed and the site will perform page-not-found handling when clicked (which can be used to capture the event and act accordingly of course).

Properties:
.addParam = Additional parameter for the URL, which can hold two markers; ###RETURN_URL### which will be substituted with the link the page would have had if it had been accessible and ###PAGE_ID### holding the page id of the page coming from (could be used to look up which fe_groups was required for access.

Example:
showAccessRestrictedPages = 22
showAccessRestrictedPages.addParams = &return_url=###RETURN_URL###&pageId=###PAGE_ID###

The example will link access restricted menu items to page id 22 with the return URL in the GET var “return_url” and the page id in the GET var “pageId”.

</snip>

k

On Friday 07 October 2005 00:06, Keith Morrison wrote:
> Keith Morrison wrote:
> > Hi all,
> >
> > I'm having the hardest time finding a solution for this.  I have a lot
> > of pages that are only viewable if you are a logged-in user; however, I
> > want those pages to show up in my menus, regardless of whether a user is
> > logged in or not.  When the user hits the page, I want to redirect to my
> > loginbox, and then redirect them back to the page they were on after
> > they log in.  However, I just can't figure out a way to display pages
> > regardless of their access.  I've tried TypoScript and also hacking some
> > of the core engine code, to no avail.  I feel like this is something I
> > need to hack in the core, which is why I'm posting to the dev list.  Any
> > suggestions would be greatly appreciated.
> >
> > Thanks,
> > Keith
>
> I apologize for responding to myself, but I did find a note in the CVS
> log from 2005-4-21 by Kasper that seems to describe the ability to do
> this, but I can't find any follow up information on it.  The revision
> note is on this page:
> http://cvs.sourceforge.net/viewcvs.py/typo3/TYPO3core/ChangeLog?rev=1.258
>
> Thanks again,
> Keith
> _______________________________________________
> Typo3-dev mailing list
> Typo3-dev at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-dev

-- 
- kasper

-----------------
Think future, not feature



More information about the TYPO3-dev mailing list