Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2004-07-30 21:57:24

spchampion
Plugin Author
Registered: 2004-06-10
Posts: 62

Re: asy_category_tags - Some additional category Tags

Hi! I made a modification to your asy_category_list tag that allows it to take a section directive. I’m using this to output a list of categories that only appear in a certain section (for archiving purposes). Here are my changes:

In the function asy_category_list, add the following line after $break=…

<pre>
<code>
$section = $section ? $section :$s;
</code>
</pre>

Later, after $q = …, change the part that says $pretext[“s”] to $section. Make sure you keep the “.” characters between $section and the quote symbols.

Scrolling down a little further, there’s an if statement like if($rs). Inside this if statement is a line beginning with $out[]. Change the part that says $pfr.$s to $pfr.$section. Once again, respect the placement of the “.” characters.

Finally, do the same thing for the later $out, except this time change the portion that says urlencode($s) to urlencode($section).

All done!

Offline

#12 2004-10-02 20:52:05

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: asy_category_tags - Some additional category Tags

Could someone post some example tags?

I would like to display only the catagories that are in the currently viewed section without subcatagories if possible. Or should I eliminate subcatagories alltogether? I can’t seem to get this to fuction. It only displays the text of the tag where I place it. I also tried it in a form.

Thanks
Jamie

Last edited by soulship (2004-10-02 20:52:59)

Offline

#13 2004-10-02 21:05:47

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: asy_category_tags - Some additional category Tags

Maybe what I want isn’t possible. It seems funtionally that in txp I should be able to have:

<ul><li>section links</li>

<li>when a section is chosen catagory links for viewed section are displayed</li><ul><li>list of articles in that catagory are shown</li></ul>

<li>when catagory is chosen subcatagories for that catagory are displayed</li><ul><li>list of articles in that catagory are shown</li></ul>

Am I missing something in this area?

Last edited by soulship (2004-10-02 21:06:06)

Offline

#14 2004-10-03 03:42:30

Vitruvius
Plugin Author
Registered: 2004-09-21
Posts: 121

Re: asy_category_tags - Some additional category Tags

I have found this tag quite useful, but have noticed that it seems to trest break tags differently to <txp:category_list />.

With the standard category_list I have successfully used the tag <txp:category_list break=”, “ /> to generate the a comma seperated list eg. : In this section: Dogs, Cats, Fish

When I use the <txp:asy_category_list break=”, “> it produces a comma seperated list, BUT puts a comma before the first entry eg:
In this section:, Dogs, Cats, Fish

It would be great if this could be fixed :)

Offline

#15 2004-11-22 19:44:01

rayne
Member
From: AL USA
Registered: 2004-03-24
Posts: 58
Website

Re: asy_category_tags - Some additional category Tags

This plugin works great, but I have a request. Can you remove the (filed under * ) part. I just want it to spit out the list of categories so I can format the rest of the text myself.

Instead of (filed under cat1, cat2) I want to be able to display Filed in: cat1, cat2

Please!!

Thanks for this plugin. I was wondering how I would make a link like that.

Update: I changed the plugin code myself and it now does what I want. Thanks again.

Last edited by rayne (2004-11-22 19:46:22)


Rayne
mama love

Offline

#16 2004-11-24 04:38:16

rayne
Member
From: AL USA
Registered: 2004-03-24
Posts: 58
Website

Re: asy_category_tags - Some additional category Tags

I have another issue with this plugin. I currently only have 2 entries and each is in a different category. But my category list is blank.

The page is here: http://wifetalks.com and the code I’m using is
<code><pre><txp:asy_category_list wraptag=“ul” break=“li” /></pre></code>

I’ve placed the code on the default page template, so it should appear on the FrontPage of the site.

Last edited by rayne (2004-11-24 04:38:46)


Rayne
mama love

Offline

#17 2005-01-26 20:15:21

greyfodder
Member
From: Los Angeles, CA
Registered: 2004-02-29
Posts: 11
Website

Re: asy_category_tags - Some additional category Tags

Is this plugin functional in 1.0rc1. I get absolutely no output, no matter what I try.


Great, now even my car needs a tinfoil hat. :)

Offline

#18 2005-02-01 12:56:55

ss
Member
Registered: 2004-03-31
Posts: 20

Re: asy_category_tags - Some additional category Tags

wonderful!

just what i need ;-)

although is there a way that i can order the categories that come out myself?

thanks.

Offline

#19 2005-02-23 04:11:48

Niloc
Member
Registered: 2004-05-15
Posts: 38

Re: asy_category_tags - Some additional category Tags

Thanks for a nice plugin!

Offline

Board footer

Powered by FluxBB