May 27, 2004

Thingys & Doodads - Best of Me

Let's say you want to display a list of links to some of your best posts... the stuff you are really proud of (my list would be empty, but that's another story)... how would you do that?

I was doing a blog tweak for Linda at Auteriffic, and she asked me if I could do something with a select category for her poetry to display in the sidebar. I don't think this is what she was looking for, but it exactly what you need to display a "best of me" series of posts in your sidebar.

Enable your category archives.
Create a Best of Me category.
Assign that category to the posts you want to display.
Cut & Paste the following code into your sidebar where you want your list to appear.

<div class="sidetitle">
Best of Me
</div>
<div class="side">
<MTEntries category="Best of Me" sort_by="title" sort_order="ascend">
<a href="<$MTEntryPermalink$>">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
</div>


I have the code sample up over at the MadLab, at the bottom of the sidebar, if you want to see what the output is. I used an existing category for testing. There are only four posts in that category, but you'll get the idea.

Posted by Madfish Willie at May 27, 2004 07:23 PM
Comments
#1

That's sweet. Could you do it so they are grouped by their main category? So the output would look something like:

Category 1
post a
post d
post f
Category 2
post c
Category 3
post b
post e

Posted by Jim at May 28, 2004 01:33 PM
#2

I think it would look something like this:

<div class="sidetitle">
Best of Me
</div>
<div class="side">
<b>Category A</b>
<MTEntries category="Category A" sort_by="title" sort_order="ascend">
<a href="">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
<b>Category B</b>
<MTEntries category="Category B" sort_by="title" sort_order="ascend">
<a href="">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
<b>Category C</b>
<MTEntries category="Category C" sort_by="title" sort_order="ascend">
<a href="">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
</div>

I haven't tested it, but I'm sure it would work just fine for your site.

Posted by Madfish Willie at May 28, 2004 01:40 PM
#3

That would work for picking categories by hand. I was thinking of assigning the "best of" category to whatever posts are the really good ones and then displaying like I have mine now. Breaking all of the "best of" ones out by their other category.

Can you specify two categories? Like yours above with one addition:

<div class="sidetitle">
Best of Me
</div>
<div class="side">
<b>Category A</b>
<MTEntries category="Category A" MTEntries category="Best of" sort_by="title" sort_order="ascend">
<a href="">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
<b>Category B</b>
<MTEntries category="Category B" MTEntries category="Best of" sort_by="title" sort_order="ascend">
<a href="">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
<b>Category C</b>
<MTEntries category="Category C" MTEntries category="Best of" sort_by="title" sort_order="ascend">
<a href="">
<$MTEntryTitle$>
</a>
<br />
</MTEntries>
</div>

Posted by Jim at May 28, 2004 03:09 PM
#4

Oops. The second "MTEntries" in each of those shouldn't be there.

Posted by Jim at May 28, 2004 03:09 PM
#5

I don't know if that would work or not... try and let us know.

Posted by Madfish Willie at May 28, 2004 07:59 PM
#6

I just tested that out at the MadLab. It took the four primary entries and filtered them down to the two secondary entries. Good One, Jim!!

Posted by Madfish Willie at May 28, 2004 08:06 PM
#7

Sweet! Now I just have to figure out how to combine that with collapsable lists.

I'm guessing that if I add enough complexity to this one item I can create a wormhole that takes me to geek heaven.

Posted by Jim at May 29, 2004 04:45 PM
#8

Just surfed in and found this really interesting place here. A lot of good stuff for everybody.

Posted by Jamie Lee at January 19, 2005 09:20 AM
#9

>Spyware Removal - Net Cop - Spyware Removal

Posted by Net-Cop at February 15, 2005 10:29 AM
Live Comment Preview
Post a comment









Remember personal info?