[Typo3-dev] Display page in menu, regardless of login status.
Keith Morrison
keith_morrison at dfci.harvard.edu
Sat Oct 8 00:12:08 CEST 2005
Kasper,
That's fantastic, exactly what I was looking for. However, it redirects,
but doesn't substitute a value for ###RETURN_URL###. Any thoughts on
how to fix this / debug it? I've tried running some debugs up the chain
of function calls, but haven't found why the totalUrl parameter of the
$LD array doesn't seem to be passed to the
changeLinksForAccessRestrictedPages function (or if it is, why it is an
empty param). It could just be a problem with my system, but I'm
running a pretty clean install right now...
Of course, it could be a stupid TypoScript error too, for reference here
is the snippet I'm using to test:
...
menu.right.3 = TMENU
menu.right.3.wrap = <ul>|</li></ul></li>
menu.right.3 {
expAll = 0
NO.ATagTitle.field = title
NO.allWrap = <li>|</li>
ACT = 1
ACT.ATagTitle.field = title
ACT.allWrap = <li class="active">|
showAccessRestrictedPages = 1378
showAccessRestrictedPages.addParams =
&return_url=###RETURN_URL###&pageId=###PAGE_ID###
}
...
Thanks much--
Keith
Kasper Skårhøj wrote:
> 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
>
>
More information about the TYPO3-dev
mailing list