mu.nu - It's mackerel stewed in chocolate!

November 27, 2005

Super Technical Question

Ok, I've got a question for the technical people. I want to use the value from a php variable as a parameter value in an MT tag. For example, I want to set the categories attribute of a MTEntries tag from a php variable:

MTEntries lastn='2' category='$thiscat'

However, when I try that, I get an error when rebuilding that says No such category 'thiscat'

I've tried various different options here. If I make it look like this:

MTEntries lastn='2' category=\"$thiscat\"

it lets me compile, but it ignores the category (it selects all posts in the mtentries section.

So, any ideas how/if this can be done?

Posted by: Ogre at 12:13 AM | Comments (4) | Add Comment | Trackbacks (Suck)

1 It can't be done. The template processing runs first, then PHP.

Sorry.

Posted by: Pixy Misa @ at November 27, 2005 04:35 AM

2 Damn. I was afraid of that. I can make it work with multiple calls to MTArchive, but blech. Thanks, anyway!

Posted by: Ogre @ at November 27, 2005 02:19 PM

Hide Comments | Add Comment






Processing 0.01, elapsed 0.0096 seconds.
22 queries taking 0.0072 seconds, 24 records returned.
Page size 6 kb.
Powered by Minx 0.8 beta.