Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2006-03-19 11:53:20
- pepebe
- Member
- From: Mannheim, Germany
- Registered: 2005-02-07
- Posts: 74
Re: How can I create a Linklist with class-properties for every li-item?
Recently there have been some minor problems with this technique discussed over here: http://forum.textpattern.com/viewtopic.php?id=15388
The issues:
- If there are no “live” articles in a section, then it will not show up in the link list. This is a problem, if you only have a “sticky” article in a section.
- If you have more than one “live” article in a section you will find that section multiple times in your list.
Those issues have now been solved.
As a sum up, here is the latest version:
The page template:
<code>
<div class=“navcontainer”>
<ul class=“navlist”>
<txp:article_custom status=“sticky” form=“Linklist_with_class_prop” sortby=“Section” sortdir=“asc” />
</ul>
</code>
*Status=“sticky” will only include sticky articles in the resulting linklist. I wonder, if I could include “sticky” as well as “live” articles in the result.
The form:
“Linklist_with_class_prop”
<code>
<txp:if_different>
<li class=”<txp:section />”><txp:section title=“1” link=“1”/></li>
</txp:if_different>
</code>
*if_different will make sure, that each section will only show up once.
Last edited by pepebe (2006-03-19 13:05:50)
Offline
#14 2006-03-20 02:38:04
- mattrock
- New Member
- Registered: 2006-02-10
- Posts: 4
Re: How can I create a Linklist with class-properties for every li-item?
Is there a way to class the <code><li></code> tag within an article with textile? Using this input: <code>*(class) line-item</code> results in the class tag getting added to the <code><ul></code> tag.
Offline
#15 2006-03-20 04:32:46
- marios
- Archived Plugin Author
- Registered: 2005-03-12
- Posts: 1,253
Re: How can I create a Linklist with class-properties for every li-item?
mattrock wrote:
Is there a way to class the <code><li></code> tag within an article with textile? Using this input: <code>*(class) line-item</code> results in the class tag getting added to the <code><ul></code> tag.
could you give a tag example, how it’s done ?
regards, marios
⌃ ⇧ < ⎋ ⌃ ⇧ >
Offline