Menu as un-nested lists (iphone navigation)

Submitting your vote...
Rating: 4.5 of 5. 8 vote(s).
Click the rating bar to rate this item.

Here's a TS snippet I made a couple weeks ago, trying to emulate the setup of the menu at:

joehewitt.com/files/iphone/navigation.html

 

It uses the page ids for generating the CSS ids.

If a page has subpages, then the CSS id is added as section (#), otherwise it just links to the page.

 

 

lib.iPhoneMenu = COA
lib.iPhoneMenu {
   
  # Example TypoScript setup for creating a menu as un-nested lists.
  # For use with the CSS/JS setup found at http://joehewitt.com/files/iphone/navigation.html
   
  wrap = <div class="iPhoneMenu"> | </div>
  10 = HMENU
  10.entryLevel = 0
   
  # 1st level
  10.1 = TMENU
  10.1 {
    stdWrap.dataWrap = <ul id="c{field:pid}" selected="true"> | </ul>
    expAll = 1
    NO {
      linkWrap = <li>|</li>
    }
    IFSUB < .NO
    IFSUB = 1
    IFSUB.doNotLinkIt = 1
    IFSUB.stdWrap.typolink.parameter.data = page:uid
    IFSUB.stdWrap.typolink.section.field = uid
  }
   
  # 2nd level
  20 < .10
  20.1.stdWrap.dataWrap >
  20.1.NO.doNotShowLink = 1
  20.1.IFSUB.doNotShowLink = 1
  20.2 < .10.1
  20.2.stdWrap.dataWrap = <ul id="c{field:pid}"> | </ul>
   
  # 3rd level
  30 < .20
  30.2.stdWrap.dataWrap >
  30.2.NO.doNotShowLink = 1
  30.2.IFSUB.doNotShowLink = 1
  30.3 < .10.1
  30.3.stdWrap.dataWrap = <ul id="c{field:pid}"> | </ul>
   
  # 4th level
  40 < .30
  40.3.stdWrap.dataWrap >
  40.3.NO.doNotShowLink = 1
  40.3.IFSUB.doNotShowLink = 1
  40.4 < .10.1
  40.4.stdWrap.dataWrap = <ul id="c{field:pid}"> | </ul>
}

 

This snippet was submitted by Peter Klein



Comments


Stig, 11-11-07 22:00:
Cool stuff!
bignut, 01-12-07 03:56:
can someone show in detail what else is needed besides the snippets in the template setup?

i got this error ...
The page is not configured! [type= 0][]
radu, 15-02-08 14:24:
make sure you create the page object on your template ;) (with type = 0)
tomas, 05-03-08 09:27:
Have you checked the css in different browsers? IE7 doesn't work for me - FF2 = ok

Add comment

* - required field

*



*
*

Top 10 Updates

Contact us geändert am  21-Jul-2013 11:33:07
Contact us geändert am  21-Jul-2013 11:33:03
Useful Links geändert am  24-Apr-2013 08:31:20
Nice fonts using Google font API geändert am  20-May-2010 16:36:47
TS-based Searchbox for Indexed Search  geändert am  18-May-2010 18:27:15
TYPO3 SEO geändert am  30-Apr-2010 09:44:22
Search engine friendly graphical headers in TYPO3 geändert am  30-Apr-2010 09:33:44
Creating a simple Infocenter using TYPO3 geändert am  17-Nov-2009 12:12:52
Making the Section Menu work correctly with TemplaVoila geändert am  05-May-2009 12:27:17
Show pages with type "Not in Menu" in a sitemap geändert am  05-May-2009 12:11:17

Latest comments

14-Mar-2014 15:53:15
Jesse Cain schrieb: I really like the backend of Typo3 and LDAP was easy and working great but I have checked what is...
My TYPO3 Page shows no content
11-Dec-2013 07:55:03
soma schrieb: Menu that recognizes when the user is on target page of the shortcut and wraps it with "active"...
External links and shortcuts directly in the menu
29-Sep-2013 21:09:40
Shirley Shirley schrieb: Hello,Thank you for this useful post.I don't find how to do the optoispe: remove item menu from the...
Alternativ sorting for menu items
Deutsch
Search: