Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Articles by Category
Sort of a complete index of your site.
This will output a nested unordered html list of your articles, organised by category (note that articles that have not been assigned a category won’t appear in the list).
- download dca_articles_by_category.gz
- unzip and put the .txt file somewhere handy on your computer
- make sure
use_pluginsis set to 1 in /lib/admin-config.php - go to admin -> plugins and use the form at the top to select the .txt file to install
- put
<txp:dca_articles_by_category />on a template to try it out
text*
Offline
Re: Articles by Category
Dean, great plugin, thanks!
Any chance you have an easy way to style the outputted list?
Offline
Re: Articles by Category
> an easy way to style the outputted list?
You mean beyond using ul and li CSS selectors?
text*
Offline
Re: Articles by Category
This is absolutely wonderful, thank you.
Offline
Re: Articles by Category
Well, sort of. See when you get the outputted list, there’s a different bullet for category list(A diamond thingie), than for entry titles(a hollow circle), and I just want to know how I can set CSS to style both the one before the category name and the ones before the article titles. =) When I try to edit the ul and li, CSS styles both as a square(my choice for list-style-type for the li)
Last edited by january (2004-04-05 00:07:56)
Offline
Re: Articles by Category
January, try styling ul ul li {} for the nested list (Article titles), and ul li {} for the outer list (Category titles). I employed this method with a great amount of success.
Offline
Re: Articles by Category
(note: .s won)
i used one type for <code>li</code>,
and another for <code>li li</code>
is this what you are trying to accomplish, January?
[here’s the css]
<code>li
{
font-family: Georgia, Times, Serif;
list-style-position: inside;
font-size: 13px;
font-style: italic;
}
li li
{
list-style-position: inside;
list-style-image: url(/images/17.gif);
font-size: 12px;
font-style: normal;
}</code>
Last edited by bluearc21 (2004-06-26 17:23:27)
“If you build it, they will come.”
Offline
Re: Articles by Category
Whee! Thank you SO much, .s and bluearc21! That was it exactly!
One more thing though, is there a way to change the way it outputs titles? I tried editting by adding in: sortby=“Posted” sortdir=“asc” and a few other variations, but it didn’t seem to change the output. =)
Last edited by january (2004-04-05 00:30:18)
Offline
Re: Articles by Category
I have not found a way, myself, though I am hoping a method exists.
Offline
Re: Articles by Category
what kind of ways to output titles are you looking for?
Dammit Jim, I’m a poet, not a programmer…
Joined the TXP Obsessed 2/25/04: http://www.chrislott.org/
Offline
Re: Articles by Category
I’m getting only a list of categories with no article items listed.
What am I missing here?
Offline
Re: Articles by Category
try hitting reload on your browser a couple of times. same happened to me and each time I reloaded, more and more of it filled in until is was all there (took 3x)??
Offline
Re: Articles by Category
belated thanks for this great plugin!
Offline
#14 2004-05-07 18:42:13
- ninjadelanuit
- New Member
- Registered: 2004-04-13
- Posts: 3
Re: Articles by Category
Hi everybody :)
I’m trying to use this wonderfull plugin to make a multiple level menu, using css and a bit of javascript (DOM) to make the job…
I’ve found some really interessant article about that like this one :
http://www.csscreator.com/menu/multimenu.php
My problem is that the structure of the nested list produced by the plugin has a little problem.
For example this the list like I obtain it with the plugin, using parented categories, etc… :
<ul>
<li>About
<ul>
<li>test</li>
</ul>
<ul>
<li>text2
<ul>
<li>First Post</li>
<li>test2</li>
</ul>
</li>
</ul>
</li>
<li>Home</li>
</ul>
This list is great, but when I apply the script and the css, all is ok with Firefox but not this IE6, the “test” button doesn’t appear !
With this list it appear :
<ul>
<li>About
<ul>
<li>test</li>
<li>text2
<ul>
<li>First Post</li>
<li>test2</li>
</ul>
</li>
</ul>
</li>
<li>Home</li>
</ul>
My problem is that I’ve played with the plugin code again and again but I can’t achieve to produce the list like I want. HELP !
I think that it could be great to have this sort of menu, with a simple and validated code…
Offline
Re: Articles by Category
Does this only display articles from the current section?
Offline