<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>randys.org &#187; liquid</title>
	<atom:link href="http://www.randys.org/tag/liquid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.randys.org</link>
	<description>wasting your precious bandwidth since 1998</description>
	<lastBuildDate>Wed, 16 Nov 2011 23:40:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Mephisto: How-to add monthly archives to the side-bar</title>
		<link>http://www.randys.org/2007/05/23/mephisto-how-to-add-monthly-archives-to-the-side-bar/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mephisto-how-to-add-monthly-archives-to-the-side-bar</link>
		<comments>http://www.randys.org/2007/05/23/mephisto-how-to-add-monthly-archives-to-the-side-bar/#comments</comments>
		<pubDate>Wed, 23 May 2007 22:53:00 +0000</pubDate>
		<dc:creator>randy</dc:creator>
				<category><![CDATA[Code Chunks]]></category>
		<category><![CDATA[General Nerdery]]></category>
		<category><![CDATA[Home]]></category>
		<category><![CDATA[How-To]]></category>
		<category><![CDATA[liquid]]></category>
		<category><![CDATA[mephisto]]></category>
		<category><![CDATA[templates]]></category>

		<guid isPermaLink="false">http://www.randys.org//2007/05/23/mephisto-how-to-add-monthly-archives-to-the-side-bar</guid>
		<description><![CDATA[One of the odd things I&#8217;m finding with Mephisto is that none of the templates I looked at had monthly archives in the sidebar. That&#8217;s generally not that strange, but Mephisto doesn&#8217;t really paginate (out of the box, anyway) sections &#8230; <a href="http://www.randys.org/2007/05/23/mephisto-how-to-add-monthly-archives-to-the-side-bar/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the odd things I&#8217;m finding with Mephisto is that none of the templates I looked at had monthly archives in the sidebar. That&#8217;s generally not that strange, but Mephisto doesn&#8217;t really paginate (out of the box, anyway) sections (categories), so the lack of any way for a user (that would be you) to navigate to older posts is beyond me. So the search for some Liquid code to display monthly archives began.</p>
<p>Mephisto&#8217;s documentation is seriously lacking, but what can you expect from a small development team with no funding behind the app. Most of the links I followed were to the Mephisto Google Group. I took this snippet from <a href="http://groups.google.com/group/MephistoBlog/browse_thread/thread/dda3a8efd2f31607/782512794b3c4ec7?lnk=gst&amp;q=archives&amp;rnum=4#782512794b3c4ec7">one particular thread</a>:</p>
<pre><code> &lt;ul&gt;
 {% for month in section.months %}
     {{ section | monthly_articles: month | assign_to: 'monthly_articles' }}
     &lt;li&gt;
     {% if monthly_articles %}
         {{ section | link_to_month: month }} ({{ monthly_articles | size }})
     {% else %}
         {{ month | format_date: 'my' }}
     {% endif %}
     &lt;/li&gt;
 {% endfor %}
 &lt;/ul&gt;
</code></pre>
<p>But this would still spit out months with no posts. We can&#8217;t have that! So, I turned it into this:</p>
<pre><code>{% if section.months.size &gt; 0 %}
&lt;ul&gt;
    &lt;li class="head"&gt;Archives&lt;/li&gt;
    {% for month in section.months %}
    {{ section | monthly_articles: month | assign_to: 'monthly_articles' }}
        {% if monthly_articles.size &gt; 0 %}
            &lt;li&gt;&lt;span class="right"&gt;{{ monthly_articles | size }}&lt;/span&gt;
            {{ section | link_to_month: month }} &lt;/li&gt;
        {% endif %}
    {% endfor %}
&lt;/ul&gt;
{% endif %}
</code></pre>
<p>Much better! Now I have this:</p>
<div align="center"><img src="http://www.randys.org/assets/2007/5/23/article_archives_sidebar-20.gif" style="border:solid 1px #333"/></div>
<div style=" text-align: center;  margin: 8px; ">
				<script type="text/javascript">
				google_ad_client = "pub-6476605957445525";
				google_ad_width = 468;
				google_ad_height = 60;
				google_ad_format = "468x60_as";
				google_ad_type = "text_image";
				google_ad_channel = "8409641020";
				google_color_border = "#C7C7C7";
				google_color_bg = "#FFFFFF";
				google_color_link = "#777777";
				google_color_text = "#777777";
				google_color_url = "#3333CC";
				google_ui_features = "rc:0";
				</script>
				<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
			</div><!-- PHP 5.x -->]]></content:encoded>
			<wfw:commentRss>http://www.randys.org/2007/05/23/mephisto-how-to-add-monthly-archives-to-the-side-bar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

