mixed TypoScript Snippets Vol. 1

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!

Inspiring people to share

Related posts:

  1. mixed TYPO3 & TypoScript Snippets Vol. 3
  2. mixed TypoScript Snippets Vol. 2
  3. How to – redirect restricted TYPO3 pages to loginform and back
  4. How to … integrate a YAML Menu to TYPO3
  5. How to … sort the Typoscript Template
  6. How to … change the title-element in TYPO3
  7. How to … change the standard target for links in TYPO3
  8. css3 snippets for every day: border-radius, gradient, shadow, …

0 Responses to “mixed TypoScript Snippets Vol. 1”


  1. No Comments

Leave a Reply

*