[Typo3-dev] Display page in menu, regardless of login status.
Onno Schuit
o.schuit at solin.nl
Fri Oct 28 20:48:06 CEST 2005
Hi Keith,
Just for my understanding: with showAccessRestrictedPages you can
- Set the Access in "Edit Pageheader" to a frontend user group
- And still get to see that specific page in the menu
Right?
I added the addParams line literally, but it didn't work. Then I figured
that you'd have to substitute the submarkers, since the "#" is really a
comment indicator in TypoScript. So I did something like:
showAccessRestrictedPages.addParams = &return_url=/&pageId=71
But then I reread the TSRef, which states:
"###RETURN_URL### which will be substituted with the link the page would
have had if it had been accessible"
So if "#" appears at the right hand side of an assignment, it does not
count as a comment indicator anymore?
Anyway, I still cannot get it to work.
I am using Typo3 3.7.1. Here is what I did at my last attempt:
---
temp.MainMenu = HMENU
temp.MainMenu.entryLevel = {$temp.entryLevel.Main}
temp.MainMenu.1 = TMENU
temp.MainMenu.1 {
showAccessRestrictedPages = 170
showAccessRestrictedPages.addParams =
&return_url=###RETURN_URL###&pageId=###PAGE_ID###
---
(artificial linebreak, not really in code)
Cheers,
Onno
Keith Morrison wrote:
> Hi Onno,
>
> You've GOT to use the line--
> showAccessRestrictedPages.addParams =
> &return_url=###RETURN_URL###&pageId=###PAGE_ID### to get this feature to
> work.
>
> I made an XCLASS extension so that this works properly with realurl if
> you need it.
>
> Let me know if it still isn't working after adding this code as I've
> done quite a bit of digging on this subject.
>
> Keith
>
>
> Onno Schuit wrote:
>
>> Hi All,
>>
>>
>> I cannot seem to get the "showAccessRestrictedPages"-feature to work
>> *AT ALL*.
>>
>> Please find my TS code included below.
>>
>>
>> Cheers,
>>
>> Onno
>>
>>
>>
>> temp.mainmenu = HMENU
>> temp.mainmenu {
>> entryLevel = {$temp.entryLevel.Main}
>> #1st Menu level
>> 1 = TMENU
>> 1 {
>> wrap = <ul class="menu">|</ul>
>> expAll = 1
>> IFSUB = 1
>> IFSUB.linkWrap = <li class="menuitem_NO"><div
>> class="hasSub"><a href="#" onclick="swapitem(this);"
>> class="arrow_right"><img border="0" height="11" width="13"
>> src="images/empty.gif"/></a>|</div><ul>
>> ACTIFSUB = 1
>> ACTIFSUB.linkWrap = <li class="menuitem_ACT"><div
>> class="hasSub"><a href="#" onclick="swapitem(this);"
>> class="arrow_down"><img border="0" height="11" width="13"
>> src="images/empty.gif"/></a>|</div><ul>
>> #NO.linkWrap = <li class="menuitem_NO"><div
>> class="noSub"><a href="#" onclick="swapitem(this);"
>> class="arrow_right"><img border="0" height="11" width="13"
>> src="images/empty.gif"/></a>|</div></li>
>> NO.linkWrap = <li class="menuitem_NO"><div class="noSub"><img
>> border="0" height="11" width="13" src="images/empty.gif"/>|</div></li>
>> ACT = 1
>> ACT.linkWrap = <li class="menuitem_ACT"><div
>> class="noSub"><img border="0" height="11" width="13"
>> src="images/empty.gif"/>|</div></li>
>>
>> #Show access-restricted page in menu
>> showAccessRestrictedPages = 158
>> }
>> ...
>>
>>
>>
More information about the TYPO3-dev
mailing list