<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Sidebar Widgets</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/heinz062/uthink-forum/share-code/widgets/" />
    <id>tag:blog.lib.umn.edu,2011-04-21:/heinz062/uthink-forum//33863</id>
    <updated>2011-04-27T18:41:20Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Enterprise 4.31-en</generator>

<entry>
    <title>Listing Page Links on your Sidebar</title>
    <link rel="alternate" type="text/html" href="http://blog.lib.umn.edu/heinz062/uthink-forum/2011/04/listing-page-links-on-your-sidebar.html" />
    <id>tag:blog.lib.umn.edu,2011:/heinz062/uthink-forum//13764.289836</id>

    <published>2011-04-27T18:39:02Z</published>
    <updated>2011-04-27T18:41:20Z</updated>

    <summary>This entry is about listing Movable Type &quot;Pages&quot; as links on your sidebar. Below is a copy of instructions I sent that demonstrates how to make two widgets on your sidebar. She wanted a dynamic list, but she didn&apos;t want...</summary>
    <author>
        <name>Charlie Heinz</name>
        <uri>http://blog.lib.umn.edu/cgi-bin/mt-cp.cgi?__mode=view&amp;blog_id=13764&amp;id=2534</uri>
    </author>
    
        <category term="Sidebar Widgets" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="en-us" xml:base="http://blog.lib.umn.edu/heinz062/uthink-forum/">
        <![CDATA[<p>This entry is about listing Movable Type "Pages" as links on your sidebar. Below is a copy of instructions I sent that demonstrates how to make two widgets on your sidebar. She wanted a dynamic list, but she didn't want to list every MT Page, just her "Resources" and "News" pages, in separate widgets.</p>

<p>--------------------------</p>

<div class="htmlcode">&quot;ICGC Events&quot; and &quot;ICGC People&quot; could simply be Movable Type Pages, just like your other Pages: &quot;Professional Associations&quot;, &quot;Job Opportunities&quot;, &quot;Fellowships&quot;, and &quot;Related Organizations.&quot;

<p>Since you want certain Pages to show up through your Resource Pages Widget, and others to show up in a new &quot;ICGC in the News&quot; widget, you're going to need to do two things: (1) Sort your Pages into folders, (2) modify your Resource Pages Widget, and (3) create a new widget.</p>

<p>(1) Folders</p>

<p>If you go to Manage &gt; Pages, click on one of the pages. You'll see on the right-hand side a link that says &quot;Change Folder&quot;. Call the folder something like &quot;Resource Pages&quot;.</p>

<p>Now go through each one of your resource pages and assign it to that new folder. It will come up later.</p>

<p>(2) Modifying your Resource Pages Widget:</p>

<p>Here's your code:</p>

<p><br />
 &lt;div class=&quot;widget-archives widget&quot;&gt;<br />
&lt;br&gt; <br />
&lt;h3 class=&quot;widget-header&quot;&gt;Resources&lt;/h3&gt;&lt;/a&gt;&lt;br&gt; <br />
&lt;ul&gt;<br />
 &lt;mt:Pages&gt;<br />
 &lt;li&gt;&lt;a href=&quot;&lt;$mt:PagePermalink$&gt;&quot;&gt;&lt;$mt:PageTitle$&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;br&gt; <br />
&lt;/mt:Pages&gt; <br />
&lt;/ul&gt;    <br />
&lt;/div&gt;</p>

<p>The first thing I'll say is that you've got a stray &lt;/a&gt; tag. The second thing is we need to specify that the Resource Pages Widget should only display pages that are in your new folder. Here's your new code with these changes:</p>

<p><br />
 &lt;div class=&quot;widget-archives widget&quot;&gt;<br />
&lt;br&gt; <br />
&lt;h3 class=&quot;widget-header&quot;&gt;Resources&lt;/h3&gt;&lt;br&gt; <br />
&lt;ul&gt;<br />
 &lt;mt:Pages folder=&quot;Resource Pages&quot;&gt;&lt;!--be careful to use the same spelling and caps in the folder name--&gt;</p>

<p> &lt;li&gt;&lt;a href=&quot;&lt;$mt:PagePermalink$&gt;&quot;&gt;&lt;$mt:PageTitle$&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;br&gt; <br />
&lt;/mt:Pages&gt; <br />
&lt;/ul&gt;    <br />
&lt;/div&gt;</p>

<p>Now Save.</p>

<p>(3) Create a new widget</p>

<p>I think you know how to start a new one, but let me know if that's not the case. You'll use the same code as your Resource Pages Widget, with a few modifications:</p>

<p><br />
 &lt;div class=&quot;widget-archives widget&quot;&gt;<br />
&lt;br&gt; <br />
&lt;h3 class=&quot;widget-header&quot;&gt;ICGC in the News&lt;/h3&gt;&lt;/a&gt;&lt;br&gt; <br />
&lt;ul&gt;<br />
 &lt;mt:Pages folder=&quot;ICGC in the News&quot;&gt;</p>

<p> &lt;li&gt;&lt;a href=&quot;&lt;$mt:PagePermalink$&gt;&quot;&gt;&lt;$mt:PageTitle$&gt;&lt;/a&gt;&lt;/li&gt;<br />
&lt;br&gt; <br />
&lt;/mt:Pages&gt; <br />
&lt;/ul&gt;    <br />
&lt;/div&gt;</p>

<p>Save.</p>

<p>Now you need to install the widget. In Design &gt; Widgets, click on your Primary Sidebar. Drag your new widget over to the Installed Widgets column. Drag and drop it in exactly the order you want (you might have to try a couple times to get it just right.)</p>

<p>Save and re-build.</p>

<p>Now, when you create a page like &quot;People&quot;, make sure to assign it to the right folder so it'll pop up in your sidebar in the right spot! </div></p>]]>
        
    </content>
</entry>

</feed>
