[TYPO3-english] icon beside the menu item?
Xavier Perseguers
typo3 at perseguers.ch
Sat Sep 12 08:12:19 CEST 2009
Hi,
Ronald Wiplinger (Lists) wrote:
> Bartosz Aninowski wrote:
>> Ronald Wiplinger (Lists) pisze:
>>
>>> How can we add an icon beside the menu item?
>>>
>> CSS :) ?
>> check also subst_elementUid
>> or be more precise
>>
>>
> What is subst_elemtUid ? Where to read more about it?
subst_elem*en*tUid, not subst_elemtUid. Be careful with TypoScript...
When talking about TypoScript, the sole "official" reference is TSREF, Go to http://typo3.org, click on Documentation, Core Documentation and open TSREF:
subst_elementUid is in MENU [1].
> more precise:
>
> A menu is a list of page links, usually on the top or on the side. Typo3
> is capable to make this menu by itself, just by adding a page into the tree.
>
> This page item is usually only a text. We want to have an icon beside
> the text, e.g., if it is a motorcycle subject then we want a motorcycle
> icon beside, but if it is a car subject, then a car.
>
> How can I do that?
I see two main approaches (I did one of them for a website)
1) Output some CSS class related to the uid of the page or to some keyword you put in a appropriate page of the page that will allow you to add icons with CSS. Something like this:
output class="page_12" and have
.page_12 {
background-image: url('images/motorcycle.png');
// offset, padding, ... to put the content = text a bit further away from icon
}
2) Output the image directly during menu generation (with same logic, keyword, page uid, ...) and have a look at the MENU documentation with link [1].
[1] http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/10/8/
--
Xavier Perseguers
http://xavier.perseguers.ch/en
One contribution a day keeps the fork away
More information about the TYPO3-english
mailing list