Help - Search - Members - Calendar
Full Version: entry categories
Movable Type Community Forum > Additional Resources > Tips and Tricks
scottandrew
From the MT 2.0 documentation:

CODE
<MTEntries category="Foo AND Bar">
...
</MTEntries>


Replace "Foo" and "Bar" with your category names.
at0m
uh.. yeah.. i tried that, but it doesn't seem to work...

i'm using this code:
<MTEntries category="General AND Updates">


anything wrong with that?
i'm POSITIVE that all my entries are assigned to the right categories, those categories DO exist, and my HTML is correct...
instead of showing the entries for those 2 categories, it shows no entries at all :-\
please help, thanks
girlie
CODE
<MTEntries category="General AND Updates">


That will list entries assigned to BOTH General and Updates, not those assigned to EITHER of them.

That's noted in the documentation too, right above the code sample.

Try OR instead of AND.

smile.gif
at0m
no no no...
i have 3 categories (General, Photography, and Updates)... i want my main page to display all entries from General AND Updates and NO ENTRIES FOR PHOTOGRAPHY...

so... i would use this.....
CODE
<MTEntries category="General AND Updates">


well... that's what i have... and it doesn't work....
when i load my page... it displays NO ENTRIES AT ALL...
girlie
Teehee, oh good, I was getting lost myself there for a minute!!

tongue.gif
itchibang
Is this possible?

CODE
<MTEntries category="<$MTEntryCategory$>">


I'm wondering if this work in the category archive template...
at0m
eh.. this is a tad bit complicated and i'll try and explain it the best i can... here goes...

ok... i have 3 categories (General, Photography, and Updates), and i want to ONLY show General and Updates when you load up my blog main page... not the entries under Photography... is there any way to do this?

thanks for all the help!
at0m
haha yanno i remember looking at that... i'm so dumb... thank you! :-p
at0m
can this option only be used with the category archive page?
Mescad
CODE
<MTEntries category="General AND Updates">


This would show entries that are assigned to both the category General and the category Updates. If you want to show all entries that are in either the General category or the Updates category, you need to use:

CODE
<MTEntries category="General OR Updates">

at0m
...
oh my god.... im sorry hahah OR works perfectly...
i thought you misunderstood what i was asking.... sorry about all that...
thanks for all of the help you guys(and girlies) wink.gif
girlie
We just told you why AND doesn't work, and why OR will work.

Try OR and see what results you get, why don't you?

EDITED TO ADD: wait, I think I get it now!!!!!

biggrin.gif

You're saying these entries HAVE been assigned to both General and Updates?huh.gif
itchibang
Is this possible?



I'm wondering if this work in the category archive template....
girlie
No, you can't nest MT tags that way.

P.S. If you find an error in your post, you should be able to use the "edit" button to fix it rather than needing to add a new one.  :D
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.