[Typo3] Showing a menu even if the page is restricted
JoH
info at cybercraft.de
Thu Sep 15 22:47:55 CEST 2005
> Thanks a lot for your answser.
> But if I clearly understand your answer I think your solution don't
> take
> in account the fact that I want to give the power to the writer
> (actually the landlord of the site) to put restriction at the *page
> level* beside that should be *arbitrary in the tree*.
>
> What you propose bellow :
>
> [loginUser = *]
> page.10.subparts.content < styles.content.get
> [else]
> page.10.subparts.content < temp.otherContent
> [global]
>
> Make sens if (AND ONLY IF) I already know which part of the tree is
> going to be restricted....
Why? - It was just an example how a condition could work.
You can use "if" combined with conditions to acchieve a result based on a
field of the pages table.
If you want your own field, you will have to create an extension that simply
adds this field and displays a checkbox to restrict the content of the page.
In this example I use the fieldname "restrictedcontent".
temp.otherContent = COA
temp.otherContent {
10 < styles.content.getLeft
20 < styles.content.loginform
}
page.10.subparts.content = COA
page.10.subparts.content {
10 = COA
10 {
if.isTrue.field = restrictedcontent
10 < temp.otherContent
}
20 = COA
20 {
if.isFalse.field = restrictedconten
10 < styles.content.get
}
}
[loginUser = *]
page.10.subparts.content.10.10 >
page.10.subparts.content.10.10 < styles.content.get
[global]
Simple as that.
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