[TYPO3-english] How can I give each menu item a different class? (optionSplit?)

Philipp Gampe philipp.gampe at typo3.org
Sun Dec 30 12:05:14 CET 2012


Hi Jost Baron,

Jost Baron wrote:

> you could use a field from the page record of the menu entry. For
> example, the following TS sets the subtitle of a page as class:

Be aware that you allow your editors to create XSS attacks this way. They 
could enter any HTML code in between.

If you can somehow limit the number of classes, then you could use a field 
with fixed values (which you can set via PageTS).
You could also use the uid or pid of the page as unique class.

If you really need an individual class, then you should use multiple wraps 
und put the data part into an own wrap where you can use htmlspecialchars.

Please send a reply if you need more examples.

Best regards
-- 
Philipp Gampe – PGP-Key 0AD96065 – TYPO3 UG Bonn/Köln
Documentation – linkvalidator
TYPO3 .... inspiring people to share!



More information about the TYPO3-english mailing list