Content Navigation with special display

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

This way you can create a small navigation of content elements. If there is no item selected in the menu all contents are displayed. When you select an item on the content navigation, only that item is displayed:

 

 

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=<span class="text">|</span><br>
    typolink.parameter.field=pid
    typolink.parameter.dataWrap=|
    typolink.additionalParams.insertData=1
    typolink.additionalParams=&content_id={field:uid}
    typolink.no_cache=1
    if.isTrue.field=header
  }
   
   
}
page.10.subparts.CONTENTNAV < temp.contentnav

 

 

 

And this is the code, to show only the selected content element...

 

page.10.subparts.CONTENT>
page.10.subparts.CONTENT=CONTENT
page.10.subparts.CONTENT {
  table=tt_content
  select{
    andWhere.insertData=1
    andWhere=uid={GPvar:content_id}
    andWhere.if.isTrue.data=GPvar:content_id
  }
}

 

Click here to see what it looks like

 

 

 

 



Comments


Gijs, 16-08-07 13:48:
To open with just one (the first) content item use the snippet below with max = 1 and orderBy = sorting

page.10>
page.10=CONTENT
page.10 {
table=tt_content
select{
andWhere.insertData=1
orderBy = sorting
andWhere=uid={GPvar:content_id}
andWhere.if.isTrue.data=GPvar:content_id
max = 1
}
}
stefan, 19-08-08 15:45:
Could you please help me?, I can't get this to work. I followed your example and here's my code:

temp.mainTemplate {
subparts.entrada = CONTENT
subparts.entrada {
table = tt_content
select.where = pid=21
select.andWhere = colPos=1
}

subparts.containers = CONTENT
subparts.containers {
table = tt_content
select {
pidInList = this
orderBy = sorting
where = colPos=0
}

renderObj = TEXT
renderObj {
field = header
wrap = |<br>
typolink.parameter.field = pid
typolink.parameter.dataWrap = |
typolink.additionalParams.insertData = 1
typolink.additionalParams = &faq={field:uid}
typolink.no_cache = 1
if.isTrue.field=header
}
}

#If item is selected
subparts.containers >
subparts.containers = CONTENT
subparts.containers {
table=tt_content
select{
where = colPos=0
andWhere.insertData=1
andWhere=uid={GPvar:faq}
andWhere.if.isTrue.data=GPvar:faq
}
}

}

page.10 < temp.mainTemplate


The second block for the selected item does overwrite everything at the first time. How can I define the condition so it only loads that when the $_GET variable is set??

Thank you
stefan, 20-08-08 11:09:
I fixed it. This is how it should be:

plugin.tx_automaketemplate_pi1 {
content.file = fileadmin/plantilla/sites/espacio_abierto/espacio_visitante/faqs/index.html
}

temp.mainTemplate {
subparts.entrada = CONTENT
subparts.entrada {
table = tt_content
select.where = pid=21
select.andWhere = colPos=1
}


subparts.containers = CONTENT
subparts.containers {
table = tt_content
select {
pidInList = this
orderBy = sorting
where = colPos=0
}

renderObj = TEXT
renderObj {
field = header
wrap = |<br>
typolink.parameter.field = pid
typolink.parameter.dataWrap = |
typolink.additionalParams.insertData = 1
typolink.additionalParams = &faq={field:uid}
typolink.no_cache = 1
if.isTrue.field=header
}
}

}

page.10 < temp.mainTemplate

[globalVar=GP:faq > 0]
page.10.subparts.containers >
page.10.subparts.containers = CONTENT
page.10.subparts.containers {
table=tt_content
select{
where = colPos=0
andWhere.insertData=1
andWhere=uid={GPvar:faq}
andWhere.if.isTrue.data=GPvar:faq
}
}
[end]

Add comment

* - required field

*



*
*

Top 10 Updates

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
Implementation of the DHTML menu from brainjar.com  geändert am  01-Feb-2009 14:02:48
Sample DHTML menu geändert am  01-Feb-2009 13:51:25
A introduction to the CONTENT object geändert am  26-Jan-2009 13:20:39

Latest comments

21-Jan-2012 20:22:24
jemmkwc jemmkwc schrieb: MOGWOX , [url=http://prdpuhwzxyrc.com/]prdpuhwzxyrc[/url],...
fe_useradmin form does not save
20-Jan-2012 20:35:32
fsivjktiuld fsivjktiuld schrieb: idCmnv <a href="http://gakbrrkrxhye.com/">gakbrrkrxhye</a>
fe_useradmin form does not save
19-Jan-2012 18:05:25
bvffee bvffee schrieb: jl2vQt , [url=http://xcinvpbclrbm.com/]xcinvpbclrbm[/url],...
External links and shortcuts directly in the menu
Deutsch
Search: