Typoscript to list subpages in a dropdown selection box menu with realurl enabled

Posted: August 4, 2012 by Sankar Vijayakumar in Typo3
Tags: , , , ,
Typoscript to list subpages in a dropdown selection box menu with realurl enabled

Try the below typoscript:

lib.dropdownmenu = HMENU
lib.dropdownmenu {
    special = directory #Type of menu list, directory etc.
    special.value = 1 #Page ids
    wrap = <select name=”select2″ onChange=”document.location.href= this.value”><option value=””>Please select..</option>|</select>
    1 = TMENU
    1{
        expAll = 1
        noBlur = 1
        NO{
            doNotLinkIt = 1
            allWrap.cObject = HTML
            allWrap.cObject {
                value{
                    typolink{
                        parameter.data = field:uid
                        returnLast = url
                    }
                    dataWrap = <option value=”|”>{field:title}</option>
                }
            }
        }
        CUR < .NO
        CUR = 1 #The current page will be preselected in the dropdown selection box
        CUR {
        allWrap.cObject.value.dataWrap = <option selected=”selected” value=”|”>{field:title}</option>
        }
    }
}

I hope this script will help you. Have a nice day :)!

Advertisements

How's it? Your comments and suggestions...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s