[TYPO3-english] A picture for every page in the navigation

JoH asenau info at cybercraft.de
Wed Jan 7 10:09:25 CET 2009


> I am looking for a way to create a navigation with a picture for each
> page. Also both NO and ACT.
> Tha pictures are made as jpg's. Not generated dynamically by TYPO3.
>
> Any ideas?

You could upload the images to the media field of each page you want to show
up in the menu.
Then you can use them within a TMENU like this:

lib.whatever = HMENU
lib.whatever {
    1 = TMENU
    1 {
        wrap = <ul>|</ul>
        NO = 1
        NO {
            wrapItemndSub = <li>|</li>
            stdWrap.cObject = IMAGE
            stdWrap.cObject {
                file {
                    import = /uploads/media
                    import.field = media
                    import.listNum = 0
                }
                altText.field = nav_title//title
                titleText.field = nav_title//title
            }
        }
        ACT < .NO
        ACT.stdWrap.cObject.file.import.listNum = 1
    }
}

This will create an unordered list of linked images with the appropriate alt
and title attributes.
listNum is used to get the correct file out of a list of filenames using 0
for the first and 1 for the second filename, so be sure to upload them in
the desired order.

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
T3 cookbook (2nd edition): http://www.typo3experts.com
Jobs: http://www.professionals-only.com




More information about the TYPO3-english mailing list