Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2008-01-17 19:20:57
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: How do I list ONLY articles that are in two specified categories?
Thanks, Bloke. Both the options you suggested earlier (a and b) sound good. I am wondering, are we able to specify any existing variable name as a field with your plugin, even those created by other plugins (such as rss_unlimited_categories)? Or do those variable names have to be coded into your plugin somehow before it can look for them?
If we actually can specify any existing variable names as a field, how do we find out the variable name that a plugin is using?
Offline
Re: How do I list ONLY articles that are in two specified categories?
alannie wrote:
Thanks, Bloke. Both the options you suggested earlier (a and b) sound good.
I’ll see what I can do. Might take a few days though; got a truckload on this week.
are we able to specify any existing variable name as a field with your plugin, even those created by other plugins (such as rss_unlimited_categories)?
The honest answer is I don’t know how rss_unlimited_categories works. I know it adds tables to the database but I don’t think it puts those values directly to the client side variables. I may be wrong; I’ve never used it. The thought did cross my mind when I made the plugin; I’ll look into how Rob does the magic and see if there’s anything I can do.
do those variable names have to be coded into your plugin somehow before it can look for them?
Not necessarily, you can access any variable as long as it’s passed to the page or as a url variable. To see which page vars are available, set debug="2"
. After all the “TEST n” information it’ll show you two arrays containing all the variables the plugin can “see” (don’t leave debug on too long; don’t want search engines indexing those paths to your server environment!)
Any values in single quotes to the left of the =>
signs are fair game to test against. Now, if Rob adds his category variables to either of these arrays then you’re laughing. If not I’ll try and find out how he does make them available on the public side and see if I can build it into the next revision.
You bring up a good point actually; I used debug mode for testing but I might actually officially add it to the help because it can be very handy to work out why comparisons aren’t working or for finding out variable names. Thanks!
Last edited by Bloke (2008-01-17 20:00:23)
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Online
#15 2008-01-17 21:23:32
- alannie
- Member
- From: Minnesota, USA
- Registered: 2005-09-15
- Posts: 150
Re: How do I list ONLY articles that are in two specified categories?
I tested debug="2"
on one of my development sites where I have rss_unlimited_categories
installed and, as you predicted, Rob’s categories don’t show up in the client side variables. :(
No rush on this though, I decided to go with a different solution for the site I’m working on. Thanks for being willing to look into it.
Offline