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_plugins
is 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