Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-01-13 15:08:36
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
horizontal link list
Hello,
I know you can make a horizontal list for navagational purposes.
How can i make in TPX a linklist of the categories and can i then use css for making a horizontal list for navigation.
Roelof
Offline
#2 2006-01-13 16:33:36
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: horizontal link list
If I’m understanding you correctly, you just want to list the links via txp:linklist for a category and then style it? If so, then just use category=“categoryname” and then class=“classname” in the tag and you’re all set. That’s how I have it done for mine. :)
Offline
#3 2006-01-13 16:40:42
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: horizontal link list
What i want is to be seen at http://www.tamarawobben.nl
The text “zwangerschap, bevalling”“ and so on will be categories.
And with css i have turned them on to a naviagtional list.
But know i have made it all in html and i want to use the posibilities that TPX offers.
Roelof
Offline
#4 2006-01-13 16:56:49
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: horizontal link list
<txp:category_list wraptag="ul" break="li" />
But this doesn’t give you the », and it will output the categories in alphabetical order, which is probably not what you want. There are several plugins though that handle section and category navigation with more flexibility.
Offline
#5 2006-01-13 17:55:45
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: horizontal link list
I had something like that done- and what I did was basically create the set of links I want under the links tab and have them grouped under the same category- say “navigation”. I called the list of links via the txp:linklist in a page template I’m using with the class, category, and form specified. Then in the form, I just threw in the txp:link tag along with any other customizations.
If you wanted to use this set of links on all pages, you could always do the output_form and include it in. The downside of this is of course the fact that you’d have to create the links first…but at least it’s something you’d only have to do once.
Oh and like doggiez said, it won’t give you the » between links…
But if the » is important to you, you could go the output_form route for the include and do it in html- but at least you’d only have to do it once.
Offline
#6 2006-01-13 19:02:28
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: horizontal link list
And the links are not sorted but will be the same order as i typ it.
And how do you mean by go for the output-form for the incluse and do it in html ??
Offline
#7 2006-01-13 20:06:27
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: horizontal link list
By using the output_form as an include, I meant you could create a new form to input all your links the way you want it to appear on your site in html with the style, etc. Then on your page template where you want to call those links, you’ll just this in to display the links:
< txp:output_form form=“yourformname” / >
That way, at least whenever you want to edit your links- you’d only have to do it once in your form. Along the same lines, if you have the same layout throughout many pages or your site and you use a header include…you can also do it this way.
Would that be something that would work for you?
Offline
#8 2006-01-14 10:50:10
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: horizontal link list
Oke,
I made the links in a category “hoofdmenu”
I have used the form Links.
Then on the page-section there is :
<div id=“hoofdmenu”>
<txp:output_form form=“Links” / >
</div>
tag_error <txp:link/> -> Warning: Wrong parameter count for link() on line 909
tag_error <txp:link_description/> -> Textpattern Warning: unknown_tag
What went wrong ?
Roelof
Offline
#9 2006-01-14 12:16:18
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: horizontal link list
roelof wrote:
<code><div id=“hoofdmenu”>
<txp:output_form form=“Links” / >
</div></code>
I think what went wrong is that Thirteen was talking about links, and you are talking about categories ;)
There is a default ‘Links’ form in Textpattern, that outputs a list of links (as entered in Content > Links). What you want is a list of links to your categories. So it’s better to name your form something like ‘category_menu’ and hardcode the category links in there:
<code>
<ul>
<li> » <a href=”/category/bevalling”>Bevalling</a></li>
<li> » <a href=”/category/zwangerschap”>Zwangerschap</a></li>
etcetera
</ul>
</code>
Then on the page where you want it:
<code>
<txp:output_form form=“category_menu” />
</code>
Edit: Roelof, you can display code on this forum with the < code> < /code> tags (without the spaces).
Last edited by doggiez (2006-01-14 12:17:21)
Offline
#10 2006-01-14 12:33:40
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: horizontal link list
there is a misunderstanding i think,
I made the links with content – links.
All these links are in a category.
Im not talking about category but im talking about links.
Roelof
Offline
#11 2006-01-14 13:42:09
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: horizontal link list
Ah, I see. Misunderstood you indeed ;)
What’s in your form ‘Links’ then?
Offline
#12 2006-01-14 13:45:04
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: horizontal link list
on this moment the form links:
<code>
<p><txp:link /><br />
<txp:link_description /></p>
</code>
Offline
#13 2006-01-14 13:58:55
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: horizontal link list
First, there’s an extra space at the end after the slash on your output_form tag. That should solve the unknown tag warning.
Second, this has nothing to do with your errors- but I just remembered that when I was trying to style the links horizontally for a txp:linklist output, I came across a problem that it wouldn’t apply. Meaning the links would appear just fine, but it won’t go horizontally even when I applied the div id. The easiest way around this, it seemed, was to not use textpattern’s links management for this specific case but instead use it purely as an html include via the output_form. So what you can do is something like this:
1. Create a form where you type in all your links in the way you’d like it to be with your id or class to style it, etc.
2. On any page template where you’d like the links to appear, you’d include that form via the txp:output_form tag. Your links should then appear horizontally as you intend it to be.
The main difference between the two methods is really the part where you’d skip the extra step of creating the links first in the textpattern’s links management. In the end, I found that it was easier for me because I still only had one form to edit the links whenever I need to and it’d apply across all the pages it appeared on. Perhaps you can try it this way. You might find it working to your favor more as well since you can style it more and use » wherever you like, etc.
Hope this helps.
Offline
#14 2006-01-14 15:13:43
- roelof
- Member
- Registered: 2005-03-27
- Posts: 647
Re: horizontal link list
Oke,
One question. How do i change this to make it work with categories ??
<code>
<ul>
<li> » <a href=“zwangerschap.htm”>Zwangerschap</a></li>
<li> » <a href=“bevalling.htm”>Bevalling</a></li>
<li> » <a href=“maand1.htm”>september t/m november</a></li>
<li> » <a href=“december.htm”>december</a></li>
<li> » <a href=“januari.htm”>januari</a></li>
</ul>
</code>
Roelof
Last edited by roelof (2006-01-14 15:14:54)
Offline
#15 2006-01-14 15:18:19
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: horizontal link list
What do you mean to work with categories? What kind of categories are you referring to?
Offline