1

I integrate a one page parallax template in typo 3 in this i want to get a menu like below so i can access specific content on click , in a subpart of page object.

<ul class="nav navbar-nav navbar-right">
    <li><a href="#header-section">HOME</a></li>
    <li><a href="#about-section">ABOUT</a></li>
    <li><a href="#price-section">PRICING</a></li>
    <li><a href="#contact-section">CONTACT</a></li>
    <li><a href="#contact-section">Call:&nbsp;+23-689-90  </a></li>
</ul>
Urs
  • 4,984
  • 7
  • 54
  • 116
chetan.g
  • 27
  • 1
  • 2
  • 10

1 Answers1

1

Try

temp.contentnav = CONTENT
temp.contentnav {
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos=0
    languageField=sys_language_uid

  }
  renderObj = TEXT
  renderObj {
    field = header 
    wrap=|

    typolink.parameter.field=pid
    typolink.parameter.dataWrap=|#{field:uid}
    if.isTrue.field=header
  }


}

So you will get an menu of all items. Then again, you won't like that the menu item's title is taken from the header field. If your site is very small and you keep control over it, why don't you just hardcode this (look at the source, by default, each article has an id).

PS I copied that from http://www.typo3wizard.com/en/snippets/menus/content-element-navigation.html


EDIT on your getting started with TS question:

In your HTML Template:

   <html>...
   <!-- ###CONTENTNAV### START --><!-- ###CONTENTRIGHT### END -->
   ...</html>

In your TypoScript setup:

page.10.subparts {
    # we fill the "subpart" (that's how this type of marker is called) with the temp object
    CONTENTNAV < temp.contentnav
}

So the caret pointing left tells TYPO3 that in that region ("subpart"), it should add the content menu you've created with the TS snippet.

Note that you can also use "Marks" (###CONTENTNAV###, don't need start and end commentary, assign with page.10.marks) and the more modern fluid templates (<f:format.html>{contentnav}</f:format.html>), which are the future. You could start here: http://typo3buddy.com/typo3-template-tutorial/fluid/

Urs
  • 4,984
  • 7
  • 54
  • 116
  • can you please tell me how to specify this part to my HTML Page? as I know that if i add CONTENTRIGHT = CONTENT CONTENTRIGHT < styles.content.getRight to setup and put to my html file so my right content was displaying. – chetan.g Sep 09 '14 at 06:04
  • I'll add it to my answer, but to work with TYPO3, you need to learn TypoScript, you won't get around it. A starting point might be this: http://docs.typo3.org/typo3cms/TyposcriptIn45MinutesTutorial/ – Urs Sep 09 '14 at 09:48