Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-10-14 11:45:23

ballmann
Member
Registered: 2006-10-14
Posts: 37

list available sections in horizontal menue?

well, this might be very simple but i can´t figure out how to do this:
i want a horizontal menue where all the sections from my section list are automatically show – only seperated by a blankspace.

and related to that: how can i show the name of the section in the title?
i managed to get the sitename there but not the section.
if i do “ <title><txp:section /></title> “ it will insert only “default” …

any ideas?
thank you very much!

<small>(edited to display code. -Els)</small>

Last edited by els (2006-10-14 12:47:04)

Offline

#2 2006-10-14 12:22:01

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,529
Website GitHub Twitter

Re: list available sections in horizontal menue?

try txp:section_list, for more details see the textbook!

If you don’t understand the explanation post again!

Hi

Offline

#3 2006-10-14 12:51:17

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: list available sections in horizontal menue?

Try this for the page title:
<code>
<title><txp:sitename /><txp:if_section name=”“><txp:else /> <txp:section title=“1” /></title>
</code>
This will only show the section name if it’s not the front page (= default section).

Offline

#4 2006-10-14 19:08:46

ballmann
Member
Registered: 2006-10-14
Posts: 37

Re: list available sections in horizontal menue?

hi Dragondz,

thank you, but this produces a vertical “list” of sections.
i need them ordered in a horizontal line of text.

any ideas?

Offline

#5 2006-10-14 19:22:36

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: list available sections in horizontal menue?

<txp:section_list wraptag="p" break=" " />

Offline

#6 2006-10-14 20:22:09

ballmann
Member
Registered: 2006-10-14
Posts: 37

Re: list available sections in horizontal menue?

oh thank you – this works!
now, it’s listed in alphabetical order.
how can i change this to a customized order?
i know – i could let the sectionnames begin with a number from 1 to 6 but this is somewhat unsmart.

Offline

#7 2006-10-14 21:26:10

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: list available sections in horizontal menue?

If all goes according to plan and textpattern 4.0.4 is released next week, then you can do this:
<code><txp:section_list wraptag=“p” break=” “ sections=“section1,section2,section3” /></code>

Offline

#8 2006-10-14 21:47:31

ballmann
Member
Registered: 2006-10-14
Posts: 37

Re: list available sections in horizontal menue?

oh, this sounds nice :-)
thank you for your help!

Offline

#9 2006-10-18 00:08:00

ballmann
Member
Registered: 2006-10-14
Posts: 37

Re: list available sections in horizontal menue?

ruud schrieb:

If all goes according to plan and textpattern 4.0.4 is released next week, then you can do this:
<code><txp:section_list wraptag=“p” break=” “ sections=“section1,section2,section3” /></code>

hi ruud!
well, 4.0.4 is released but i can´t manage to get this “sections=“section1,section2,section3”“-thing workin.
any ideas why it isn´t workin?

thank you!

Offline

#10 2006-10-18 00:12:02

ballmann
Member
Registered: 2006-10-14
Posts: 37

Re: list available sections in horizontal menue?

sorry ruud – please ignore my last post!
i´m too stupid for this business … :-)
it works! my fault … THANK YOU :-)

Offline

Board footer

Powered by FluxBB