[TYPO3] Navigation from other table than pages

Cate & Peter catepeter at optusnet.com.au
Tue Jan 30 01:55:19 CET 2007


Hi Christian

>I want to create a Navigation from the table of my extension.

This is the code I used to create an extension from the dr_wiki table - it
might point you in the right direction (it works :) )


#Nav
lib.nav = CONTENT
lib.nav{
  table = tx_drwiki_pages
  select {
    pidInList = this
    selectFields = pid, keyword
    
 }
  renderObj = TEXT
  renderObj {
    required=1
    
    # Displays the keyword inside the <li/> tags
    field = keyword
    
    # Inner wrap around individual rows
    wrap=<li class="leftnav">|</li>
    
    # Wraps the keyword with a link to the correct page
    typolink {
      # Links to the page that the wiki keyword is found on
      parameter.data = field:pid
      
      # Adds the keyword to the query string 
      additionalParams.wrap = &tx_drwiki_pi1[keyword]=|
      additionalParams.data = field:keyword
    }
  }
  
  # Outer wrap around all rows
  wrap = <ul class="nav"> | </ul>
}

Regards
Cate




More information about the TYPO3-english mailing list