Today i will start a new Session and post some nice and tricky TypoScript Snippets for Typo3 (tested in Ver. 4.4)
show restricted Pages & add css (class=”locked”)
make restricted pages visible for all, but not accessible
# 11 = Page with Login Plugin
config.typolinkLinkAccessRestrictedPages = 11
config.typolinkLinkAccessRestrictedPages_addParams = &referer=###RETURN_URL###
#for the menu
lib.menu.1 {
showAccessRestrictedPages = NONE
showAccessRestrictedPages.addParams = &redirect_url=###RETURN_URL###
}
now, add some class or attributes to the restricted pages
[usergroup = *]
# after login
...
[else]
#without login
...
lib.menu.1.NO = 1
lib.menu.1.NO.ATagParams.if {
value=0
isGreaterThan.field = fe_group
}
lib.menu.1.NO.ATagParams = class="locked"
lib.menu.1.IFSUB = 1
lib.menu.1.IFSUB.ATagParams.if {
value=0
isGreaterThan.field = fe_group
}
lib.menu.1.IFSUB.ATagParams = class="locked"
[end]
hard to find the right solution, i spent several hours for this snippets – so have fun!
Related posts:
- mixed TYPO3 & TypoScript Snippets Vol. 3
- mixed TypoScript Snippets Vol. 2
- How to – redirect restricted TYPO3 pages to loginform and back
- How to … integrate a YAML Menu to TYPO3
- How to … sort the Typoscript Template
- How to … change the title-element in TYPO3
- How to … change the standard target for links in TYPO3
- css3 snippets for every day: border-radius, gradient, shadow, …
0 Responses to “mixed TypoScript Snippets Vol. 1”
Leave a Reply