Help - Search - Members - Calendar
Full Version: Make two archive columns?
Movable Type Community Forum > Additional Resources > Tips and Tricks
kati
How do I take my one long archives column and make it in to two shorter side by side columns? And tell me in baby-steps please... you'd be amazed by what I don't know. Thank you!

Kati Riehl
http://riehlworld.net
adamrice
First off--you've got some serious HTML errors on your page. This chunk:
CODE
<div id="banner">
<img alt="NewBlogBanner2.jpg" src="http://riehlworld.net/archives/images/NewBlogBanner2.jpg" width="640" height="126" border="0" align="left"/>

<img alt="kati-feathered.jpg" src="http://riehlworld.net/archives/images/kati-feathered.jpg" width="320" height="151" border="0" align="right"/>

</div>
must appear after the BODY tag. I'm surprised it's appearing at all.

(from here on out, read {squiggly braces} as angle brackets)

Open your main index. Figure out which chunk of content you want on the left, and which on the right. Remove the old {div id="links"} tag and its closing tag; wrap the two chunks in (for example) {div id="sidebar1"} and {div id="sidebar2"}, making sure to close each div correctly. Do not nest one in the other. Save and rebuild the main index.

Next: open your stylesheet. Find the #links selector. Rename that #sidebar1. Then insert a copy that whole rule, including its styling information, rename the copy #sidebar2, and change float: left; to float: right. Save and rebuild the stylesheet.
kadyellebee
To divide up your Archive listing, the Columnize plugin is probably the best bet. smile.gif

Kristine
kati
Thanks, Adam. I am painfully aware of the errors in my code and am only beginning to slowly address them as I learn more about what I'm doing. Thanks for the tip on the banner. I corrected it. If you want to feed me another tip, I'll gladly take it. smile.gif

I'm still a bit lost with this column code. The only thing I want to columnize is the Archives section, not the entire links sidebar. As far as I understand it, this is the only part I want to make into two columns:

CODE
<div class="sidetitle">
Archives
</div>

<div class="side">
<MTArchiveList archive_type="Monthly">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a><br />
</MTArchiveList>
</div>


Any further guidance would be greatly appreciated. Thank you!
kadyellebee
I didn't test this out, but integrated your code and the example code for MT Columize to get this:

CODE
<MTColumnize cols="2">
<MTColumnizeText>
<MTArchiveList archive_type="Monthly">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a><br />
  <MTColumnizeBreakHere>
</MTArchiveList>
</MTColumnizeText>
   <MTColumnizeColumn>
<ul style="float:left">
      <$MTColumnizePortion$>
</ul>
   </MTColumnizeColumn>
  </MTColumnize>
</ul>
<br clear="all">


Kristine
kati
Thanks, Kristine. smile.gif
It was not my intention to ignore your reply last time, but I walked away for a moment and never got back to finish what I was doing.

I took a look at the plug-in when you first linked it and was unsure how to use it, so I greatly appreciate you providing me with more help.

I tried it and it doesn't seem to have worked. The only thing that is different is that now some of my gray text on the sidebar has turned black and the font has changed.

What to do?
kadyellebee
Did you go to the plugin page and download the plugin and then upload the file to your server? When I view the source of your page, I see ending tags that are showing, and that's usually a sign that the plugin isn't installed.

And I see an error in my code; when changing it, I left UL tags in after taking LI tags out - here's a revised copy:
CODE
<MTColumnize cols="2">
<MTColumnizeText>
<MTArchiveList archive_type="Monthly">
<a href="<$MTArchiveLink$>"><$MTArchiveTitle$></a><br />
 <MTColumnizeBreakHere>
</MTArchiveList>
</MTColumnizeText>
  <MTColumnizeColumn>
<div style="float:left">
     <$MTColumnizePortion$>
</div>
  </MTColumnizeColumn>
 </MTColumnize>
<br clear="all" />


I think that should turn out better. smile.gif

Kristine
kati
Aarrrgh.

Okay, I changed the code you provided and checked it twice. I downloaded the plugin and then uploaded it to the server and... nothing.

Am I still missing something (besides a basic understand of what I'm doing)? huh.gif
kadyellebee
I'm still seeing MTColumnize tags in your source like
CODE
</MTColumnizeText>


So the plugin isn't processing the tags. Can you double check where you uploaded the plugin? You should have a plugins directory in the same place as mt.cgi. And the Columnize.pl file goes in there.

Kristine
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.