[Typo3] Showing a menu even if the page is restricted

JoH info at cybercraft.de
Thu Sep 15 10:46:45 CEST 2005


> Well, I can understand it looks strange to display a menu of a page
> wich is  restricted.
> The reason is actually a commercial one.
> We want to show to the new user (visitor)  that some informations
> could be reach only if they suscribe.
> But to achieve this goal we need to **show** the page exists...

Well - it's easier than you might have thought:

Use TypoScript conditions for your markers/subparts.
Since it's the content that is restricted and not the page itself you can do
something like this in an ext+ template of the entrypage for the restricted
area:

temp.otherContent = COA
temp.otherContent {
    10 = TEXT
    10 {
        # Your additional message here
        #to explain why a user should login
    }
    20 < styles.content.loginform
}

[loginUser = *]
page.10.subparts.content < styles.content.get
[else]
page.10.subparts.content < temp.otherContent
[global]

Since otherContent is a COA you can insert as many Elements, Records or
other stuff as you like.
You can even create other elements for the different subparts or markers you
are using.
Another approach is to use different columns for restricted and non
restricted content.
So your Editors can insert different "non restricted" content for each page.
The only thing that's always added is the loginform.

temp.otherContent = COA
temp.otherContent {
    10 < styles.content.getLeft
    20 < styles.content.loginform
}

[loginUser = *]
page.10.subparts.content < styles.content.get
[else]
page.10.subparts.content < temp.otherContent
[global]

You see like in most cases the solution is pure TypoScript and no extra PHP

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list