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 November 27, 2005 12:13 AM | TrackBack
Comments
#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
Live Comment Preview
Post a comment









Remember personal info?