<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
    xmlns:admin="http://webns.net/mvcb/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:content="http://purl.org/rss/1.0/modules/content/">

    <channel>
    
    <title>EE Insider Tips</title>
    <link>http://eeinsider.com/tips</link>
    <description>Community created tips and tutorials on developing websites with ExpressionEngine.</description>
    <dc:language>en</dc:language>
    <dc:creator>Mark Huot</dc:creator>
    <dc:rights>Copyright 2010</dc:rights>
    <dc:date>2010-02-02T16:28:01+00:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title>Using EE’s XID in Ajax</title>
      <link>http://eeinsider.com/tips/view/using-ees-xid-in-ajax/</link>
      <guid>http://eeinsider.com/tips/view/using-ees-xid-in-ajax/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2010-02-02T15:28:01+00:00</dc:date>
      <content:encoded><![CDATA[<p>If you&#8217;re submitting data in the EE CP through Ajax you may run into some issues where you&#8217;re constantly 302 redirected back to the homepage. One reason for this is you&#8217;re not submitting an XID hash to ensure the security of your form.</p>

<p>To fix this simply add the following somewhere in the data to-be-submitted:</p>

<pre>
{...'XID': '&lt;?=$FNS->add_form_security_hash('{ XID_HASH }')?&gt;'...}
</pre>

<p>[Note: Remove the spaces from around XID_HASH, keeping them in was breaking the display.]</p>

<p>That should ensure you get past the XID check.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Using view files in custom extensions</title>
      <link>http://eeinsider.com/tips/view/using-view-files-in-custom-extensions/</link>
      <guid>http://eeinsider.com/tips/view/using-view-files-in-custom-extensions/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-11T14:10:02+00:00</dc:date>
      <content:encoded><![CDATA[<p>With EE 1.6.8, we now have the ability to use <strong>view files</strong> in modules and that&#8217;s great news for add-on developers. Recently I wanted to use view files for an extension I was developing, but the EE docs do not list a way to do that. Specifically, I wanted to use view files for the extension <em>settings form</em> and for the <em>contents of the publish tab</em> for the extension. Here&#8217;s a snippet of how to use view files in a custom extension:</p>

<p>
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">body&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">view</span><span style="color: #007700">(</span><span style="color: #0000BB">PATH_EXT</span><span style="color: #007700">.</span><span style="color: #DD0000">'ext_widget/ext_settings.php'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$vars</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">TRUE</span><span style="color: #007700">);&nbsp;</span>
</span>
</code></div>

<p>I created a folder called <em>ext_widget</em> to hold my view files, keeping the view file separated from other extension files.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Make embedded params tag params.</title>
      <link>http://eeinsider.com/tips/view/make-embedded-params-tag-params/</link>
      <guid>http://eeinsider.com/tips/view/make-embedded-params-tag-params/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-09T01:40:55+00:00</dc:date>
      <content:encoded><![CDATA[<p>You can access embed params directly in your plugin code. This is super useful when you include a plugin / module inside an embedded template and need to pass through params.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php&nbsp;<br />&nbsp;<br /></span><span style="color: #FF8000">//&nbsp;http://gist.github.com/204612<br /><br /></span><span style="color: #0000BB">make_embed_params_tag_params</span><span style="color: #007700">()<br /></span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;the&nbsp;valid&nbsp;params&nbsp;for&nbsp;the&nbsp;tag<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$valid_params&nbsp;</span><span style="color: #007700">=&nbsp;array(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'entry_id'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'weblog_id'</span><span style="color: #007700">,<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #DD0000">'url_title'<br />&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">);<br />&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;for&nbsp;each&nbsp;of&nbsp;the&nbsp;embedded&nbsp;params<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">foreach&nbsp;(</span><span style="color: #0000BB">$TMPL</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">embed_vars&nbsp;</span><span style="color: #007700">as&nbsp;</span><span style="color: #0000BB">$key&nbsp;</span><span style="color: #007700">=&gt;&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;parse&nbsp;the&nbsp;param&nbsp;key<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//&nbsp;embed:&nbsp;...&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$param_key&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">substr</span><span style="color: #007700">(</span><span style="color: #0000BB">$key</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">6</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;is&nbsp;the&nbsp;tag&nbsp;param&nbsp;actually&nbsp;set?<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">isset(</span><span style="color: #0000BB">$TMPL</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tagparams&#91;$param_key&#93;</span><span style="color: #007700">)&nbsp;===&nbsp;</span><span style="color: #0000BB">FALSE<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;is&nbsp;the&nbsp;embbed&nbsp;param&nbsp;in&nbsp;the&nbsp;valid&nbsp;params&nbsp;array?<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&amp;&amp;&nbsp;</span><span style="color: #0000BB">in_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$param_key</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$valid_params</span><span style="color: #007700">)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #FF8000">//&nbsp;add&nbsp;the&nbsp;embed&nbsp;param&nbsp;to&nbsp;the&nbsp;tag&nbsp;param<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$TMPL</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">tagparams&#91;$real_key&#93;&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#125;<br />&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Cover Image with FF matrix gallery</title>
      <link>http://eeinsider.com/tips/view/cover-image-with-ff-matrix-gallery/</link>
      <guid>http://eeinsider.com/tips/view/cover-image-with-ff-matrix-gallery/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-11-08T02:43:44+00:00</dc:date>
      <content:encoded><![CDATA[<p>Making a gallery using FF Matrix and Ngen file field is a very popular way to make a gallery. I made a gallery like this but wanted to pull one image from each gallery into the sidebar and also using the same image as a post image in a news item.</p>

<p>Now the client can change the cover photo easily without having to reorder the matrix.</p>

<p>To ensure that the image pulled was the same one and chosen by the client I added a checkbox to the matrix. and then used the following code.</p>

<p>Sidebar Gallery
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"gallery"&nbsp;</span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"9&nbsp;orderby="</span><span style="color: #0000BB">random</span><span style="color: #DD0000">"&nbsp;disable="</span><span style="color: #0000BB">trackback</span><span style="color: #007700">|</span><span style="color: #0000BB">member_data</span><span style="color: #007700">|</span><span style="color: #0000BB">comments</span><span style="color: #DD0000">"&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;gallery&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if&nbsp;cover&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;exp:imgsizer:size&nbsp;src="</span><span style="color: #0000BB">&#123;photo&#125;</span><span style="color: #DD0000">"&nbsp;width="</span><span style="color: #0000BB">73</span><span style="color: #DD0000">"&nbsp;height="</span><span style="color: #0000BB">73</span><span style="color: #DD0000">"&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a&nbsp;href="</span><span style="color: #0000BB">&#123;title_permalink</span><span style="color: #007700">=</span><span style="color: #0000BB">photos</span><span style="color: #007700">/</span><span style="color: #0000BB">gallery</span><span style="color: #DD0000">"&#125;"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;sized&#125;"&nbsp;</span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;width&#125;"&nbsp;</span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;height&#125;"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;caption&#125;"&nbsp;</span><span style="color: #007700">/&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">imgsizer</span><span style="color: #007700">:</span><span style="color: #0000BB">size&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">gallery&#125;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>and using related entry on the news page</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;related_entries&nbsp;id</span><span style="color: #007700">=</span><span style="color: #DD0000">"gallery_relationship"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;gallery&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if&nbsp;cover&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">imgsizer</span><span style="color: #007700">:</span><span style="color: #0000BB">size&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;photo&#125;"&nbsp;</span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"550"&nbsp;</span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"300"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;sized&#125;"&nbsp;</span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;width&#125;"&nbsp;</span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;height&#125;"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;caption&#125;"&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"newsBgThumb"&nbsp;</span><span style="color: #007700">/&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">imgsizer</span><span style="color: #007700">:</span><span style="color: #0000BB">size&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">gallery&#125;&nbsp;&nbsp;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">related_entries&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Managing comments</title>
      <link>http://eeinsider.com/tips/view/view-all-comments/</link>
      <guid>http://eeinsider.com/tips/view/view-all-comments/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-30T14:12:31+00:00</dc:date>
      <content:encoded><![CDATA[<p>Just learned this from a client(!). To view a list of all comments on your site, from the Edit screen, leave the keywords field blank, choose &#8220;Comments&#8221; from the &#8220;Search In&#8221; dropdown, and search.&nbsp; You can also use the Weblog filter to view comments from one specific weblog.</p>

<p>(This is actually in the docs, but who reads those anyway?)</p>

<p>You can then add a &#8220;Manage Comments&#8221; tab by adding the following URL in the Tab Manager.</p>

<p><code>http://yoursite.com/system/index.php?C=edit&amp;M=view_entries&amp;search_in=comments</code>
</p>]]></content:encoded>

    </item>

    <item>
      <title>Dynamic Monthly Date Parameters</title>
      <link>http://eeinsider.com/tips/view/monthly-dynamic-start-and-stop-parameters/</link>
      <guid>http://eeinsider.com/tips/view/monthly-dynamic-start-and-stop-parameters/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-28T21:44:34+00:00</dc:date>
      <content:encoded><![CDATA[<p>For a recent &#8216;events&#8217; based site I needed to show current month events only but not when on a &#8216;dated&#8217; URL i.e. ...events/2009/10</p>

<p>The <a href="http://expressionengine.com/docs/modules/weblog/parameters.html#par_year" title="link to EE docs">documentation</a> explains the option of year=, month= and day=, but hard codes the examples.</p>

<p>So, 
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">year</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;current_time&nbsp;format='%Y'&#125;"&nbsp;</span><span style="color: #0000BB">month</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;current_time&nbsp;format='%m'&#125;"&nbsp;</span>
</span>
</code></div><p>
slipped into the parameters will mean that your month is always the current one. </p>

<p>This could obviously be extended to years or days in a similar way.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Embed an Embed within Itself?</title>
      <link>http://eeinsider.com/tips/view/embed-an-embed-within-itself/</link>
      <guid>http://eeinsider.com/tips/view/embed-an-embed-within-itself/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-17T16:34:55+00:00</dc:date>
      <content:encoded><![CDATA[<p>I just wrote <a href="http://trevordavis.net/blog/tutorial/expressionengine-embed-an-embed-within-itself/">a blog article about this</a>, but I figure it would be good to share here too.</p>

<p>We wanted to be able to show an entry that was tagged with a certain category, and if no entries were found, just show an entry with any or no category. I couldn&#8217;t think of a good way to do this, and I knew I couldn&#8217;t nest exp:weblog:entries tags. </p>

<p>The code we were working with was already in an embed file, so we just embedded the same embed within the embed without the category parameter. Even though <a href="http://expressionengine.com/docs/templates/embedding_templates.html">the documentation (notes section)</a> says you can&#8217;t do this, we knew that we would never be creating an infinite loop, so it worked. </p>

<p>Here is the code from our embed:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">channel_name</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:channel&#125;"</span><span style="color: #0000BB">&#125;<br />&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">category_id</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:category&#125;"</span><span style="color: #0000BB">&#125;<br />&#123;assign_variable</span><span style="color: #007700">:</span><span style="color: #0000BB">show_expired</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:show_expired&#125;"</span><span style="color: #0000BB">&#125;<br /><br />&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;channel_name&#125;"&nbsp;</span><span style="color: #0000BB">category</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;category_id&#125;"&nbsp;</span><span style="color: #0000BB">show_future_entries</span><span style="color: #007700">=</span><span style="color: #DD0000">"yes"&nbsp;</span><span style="color: #0000BB">show_expired</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;show_expired&#125;"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"1"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #0000BB">“category_fields</span><span style="color: #007700">|</span><span style="color: #0000BB">custom_fields</span><span style="color: #007700">|</span><span style="color: #0000BB">member_data</span><span style="color: #007700">|</span><span style="color: #0000BB">pagination</span><span style="color: #007700">|</span><span style="color: #0000BB">trackbacks”&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;title&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">p&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"rightSide"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;url_title_path="</span><span style="color: #0000BB">&#123;embed</span><span style="color: #007700">:</span><span style="color: #0000BB">template_path&#125;</span><span style="color: #DD0000">"&#125;"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">img&nbsp;src</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;events_feature_image&#125;"&nbsp;</span><span style="color: #0000BB">alt</span><span style="color: #007700">=</span><span style="color: #DD0000">""&nbsp;</span><span style="color: #007700">/&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;events_summary&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;url_title_path="</span><span style="color: #0000BB">&#123;embed</span><span style="color: #007700">:</span><span style="color: #0000BB">template_path&#125;</span><span style="color: #DD0000">"&#125;"&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"more"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Read&nbsp;more&nbsp;»</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;if&nbsp;no_results&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;embed</span><span style="color: #007700">=</span><span style="color: #0000BB">“site</span><span style="color: #007700">/.</span><span style="color: #0000BB">events”&nbsp;channel</span><span style="color: #007700">=</span><span style="color: #0000BB">“events”&nbsp;show_expired</span><span style="color: #007700">=</span><span style="color: #0000BB">“yes”&nbsp;template_path</span><span style="color: #007700">=</span><span style="color: #0000BB">“news</span><span style="color: #007700">-</span><span style="color: #0000BB">events</span><span style="color: #007700">/</span><span style="color: #0000BB">events”&#125;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>And then you would include that embed file by doing this:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;embed</span><span style="color: #007700">=</span><span style="color: #0000BB">“site</span><span style="color: #007700">/.</span><span style="color: #0000BB">events”&nbsp;channel</span><span style="color: #007700">=</span><span style="color: #0000BB">“events”&nbsp;category</span><span style="color: #007700">=</span><span style="color: #0000BB">“7”&nbsp;show_expired</span><span style="color: #007700">=</span><span style="color: #0000BB">“no”&nbsp;template_path</span><span style="color: #007700">=</span><span style="color: #0000BB">“news</span><span style="color: #007700">-</span><span style="color: #0000BB">events</span><span style="color: #007700">/</span><span style="color: #0000BB">events”&#125;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Flexible weblog entry searching by passing URL segments.</title>
      <link>http://eeinsider.com/tips/view/flexible-weblog-entry-searching-by-passing-url-segments/</link>
      <guid>http://eeinsider.com/tips/view/flexible-weblog-entry-searching-by-passing-url-segments/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-10-07T18:09:11+00:00</dc:date>
      <content:encoded><![CDATA[<p>Inspired by <a href="http://eeinsider.com/tips/view/dont-forget-the-power-of-passing-variables-through-the-url-url-segments/">Justin&#8217;s tip</a> passing variables via the URL, something similar I&#8217;ve used is for an album review site to give additional search options:</p>

<p>a weblog for the album review may also include other info, eg label, artist, year, city, country whic you may then want to be links that take you to a page of all other albums by that artist, on the same label, from teh same city.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">Artist</span><span style="color: #007700">:&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://eeinsider.com/albums/search/artist/&#123;artist/"</span><span style="color: #0000BB">&#125;</span><span style="color: #DD0000">"&gt;&#123;artist&#125;&lt;/a&gt;<br />Label:&nbsp;&lt;a&nbsp;href="</span><span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//eeinsider.com/albums/search/label/&#123;label/"&#125;"&gt;&#123;label&#125;&lt;/a&gt;<br /></span><span style="color: #0000BB">City</span><span style="color: #007700">:&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"http://eeinsider.com/albums/search/city/&#123;city/"</span><span style="color: #0000BB">&#125;</span><span style="color: #DD0000">"&gt;&#123;city&#125;&nbsp;</span>
</span>
</code></div>

<p>then on the next page, display results using a simple weblog entries and the search parameter:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"albums"&nbsp;</span><span style="color: #0000BB">search</span><span style="color: #007700">:</span><span style="color: #0000BB">&#123;segment_3&#125;</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;segment_4&#125;"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"pagination|trackbacks"&nbsp;</span><span style="color: #0000BB">orderby</span><span style="color: #007700">=</span><span style="color: #DD0000">"title"&nbsp;</span><span style="color: #0000BB">sort</span><span style="color: #007700">=</span><span style="color: #DD0000">"asc"</span><span style="color: #0000BB">&#125;&nbsp;</span>
</span>
</code></div>

<p>the downside of using the URLs to pass variables to pages, is the 404 issue - not sure how well you could manage those as you need the flexability to have URLs not relating to pages.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Installing EE 1.x above webroot</title>
      <link>http://eeinsider.com/tips/view/installing-ee-1.x-above-webroot/</link>
      <guid>http://eeinsider.com/tips/view/installing-ee-1.x-above-webroot/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-09-28T19:08:00+00:00</dc:date>
      <content:encoded><![CDATA[<p>Although it&#8217;s been long rumoured to be possible in the 1.x branch, the documentation isn&#8217;t entirely clear on this. It turns out that it&#8217;s quite easy:</p>

<p>1. Install EE as normal within a web-accessible directory</p>

<p>2. Manually move the entire system (or whatever you renamed it) to your preferred location</p>

<p>3. Edit the system_path variable in path.php to reflect the new location of your system folder</p>

<p>4. Now follow the EE docs instructions for <a href="http://expressionengine.com/docs/installation/masked_cp_access.html">Masking Access to the Control Panel</a></p>

<p>5. Er, there is no step 5!
</p>]]></content:encoded>

    </item>

    <item>
      <title>Use Gypsy to migrate entries between weblogs</title>
      <link>http://eeinsider.com/tips/view/use-gypsy-to-migrate-entries-between-weblogs/</link>
      <guid>http://eeinsider.com/tips/view/use-gypsy-to-migrate-entries-between-weblogs/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-09-18T16:42:42+00:00</dc:date>
      <content:encoded><![CDATA[<p>Use Brandon Kelly&#8217;s brilliant Gypsy extension to migrate content between weblogs that are not in the same field group.</p>

<p>Set your destination fields as gypsy fields, and mark them to appear in your source weblog.</p>

<p>Edit each entry, and copy/paste the content to their new destination fields.<br />
On the server, you may have to move some uploaded files around as your field upload directories may have changed.</p>

<p>When you&#8217;re done editing, disable gypsy, or unmark those specific fields. Your content should now be in your new destination weblog.</p>

<p>Note: This doesn&#8217;t work well with FF Matrix fields.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Save common entry filters as tabs</title>
      <link>http://eeinsider.com/tips/view/save-common-entry-filters-as-tabs/</link>
      <guid>http://eeinsider.com/tips/view/save-common-entry-filters-as-tabs/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-09-18T16:14:28+00:00</dc:date>
      <content:encoded><![CDATA[<p>Sure, there’s Elwin’s wonderful <a href="http://expressionengine.com/forums/viewthread/68277/">Edit  Menu</a> extension, which pre-filters your entry list by weblog. But what if you find yourself routinely filtering the list by Category, Status, or anything else? Here’s what: you create a new tab for that filter.</p>

<p>Simply clicking the “New Tab” link won’t do the trick though, since filters are submitted as POST data, and thus not reflected in the URL. So we’re going to have to put in a little effort.</p>

<p>Go to your Edit tab, and then type this URL into your address bar (but don’t hit Return):</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//example.com/system/index.php?C=myaccount&amp;M=tab_manager&amp;link=C--edit/M--view_entries/&nbsp;</span>
</span>
</code></div>

<p>Replace “http://example.com/system” with the URL to your site’s system folder.</p>

<p>Now, open your Web Inspector. For each filter you’d like to be pre-populated, inspect its form element, and add the following to your URL:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">input_name</span><span style="color: #007700">--</span><span style="color: #0000BB">input_value</span><span style="color: #007700">/&nbsp;</span>
</span>
</code></div>

<p>So, for example, if I wanted my new tab to only show Open entries in alphabetic order, my URL would look like this:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//example.com/system/index.php?C=myaccount&amp;M=tab_manager&amp;link=C--edit/M--view_entries/status--open/order--alpha/&nbsp;</span>
</span>
</code></div>

<p>Once you’ve finished specifying your filters, go ahead and bang that Return key. You’ll be brought to the familiar Add Tab page. Name your tab, and save it.</p>

<p>Enjoy!<br />
-<a href="http://brandon-kelly.com/">Brandon</a>
</p>]]></content:encoded>

    </item>

    <item>
      <title>Dynamic Sub Navigation Class</title>
      <link>http://eeinsider.com/tips/view/dynamic-sub-navigation-class/</link>
      <guid>http://eeinsider.com/tips/view/dynamic-sub-navigation-class/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-09-17T11:11:29+00:00</dc:date>
      <content:encoded><![CDATA[<p>Variation on a theme, this has been written before. In an effort to keep it simple, and keep raw PHP out of the equation, here is the method for adding a css hook to the <em>current</em> </p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">li&nbsp;</span>
</span>
</code></div> by comparing the <div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">url_title&nbsp;</span>
</span>
</code></div> to the appropriate <div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">segment&nbsp;</span>
</span>
</code></div><p>. Thanks to all who came before me.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">&lt;</span><span style="color: #0000BB">ul&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"subnav_list"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"weblog_name"&nbsp;</span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">li&#123;if&nbsp;segment_</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">em</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">n</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">em</span><span style="color: #007700">&gt;&nbsp;==&nbsp;</span><span style="color: #0000BB">url_title&#125;&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"current"</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;title_permalink="</span><span style="color: #0000BB">weblog_name</span><span style="color: #007700">/</span><span style="color: #0000BB">view</span><span style="color: #DD0000">"&#125;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;title&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span style="color: #0000BB">li</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;<br /></span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">ul</span><span style="color: #007700">&gt;&nbsp;</span>
</span>
</code></div>]]></content:encoded>

    </item>

    <item>
      <title>Don&#8217;t forget the power of passing Variables through the URL &amp;amp; URL Segments</title>
      <link>http://eeinsider.com/tips/view/dont-forget-the-power-of-passing-variables-through-the-url-url-segments/</link>
      <guid>http://eeinsider.com/tips/view/dont-forget-the-power-of-passing-variables-through-the-url-url-segments/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-08-21T19:57:16+00:00</dc:date>
      <content:encoded><![CDATA[<p>I recently had a clients site where I needed to pass information from one page to the next. I was passing a custom field to a hidden field of a contact form. I originally started to handle this by creating a cookie and then on the contact page reading the cookie and inputing the information in the needed area. That was until someone in the forms suggested segment variables.</p>

<p>So here is the code to pass the variable to the url:
</p><div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"my_weblog"&nbsp;</span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"comments|trackbacks|member_data"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"25"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;title&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;short_blirb&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"/template_group/template_name/&#123;url_title&#125;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Read&nbsp;More</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;or&nbsp;&nbsp;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;path=template_group/template_name&#125;&#123;url_title&#125;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Contact&nbsp;Us</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>We used the path variable to call the template that we want but we also added in this case the url_title to the end of the url. Now on your next template you can use the data in an array of ways. Here is one way</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;if&nbsp;segment_3&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #DD0000">""</span><span style="color: #0000BB">&#125;<br />&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"my_weblog"&nbsp;</span><span style="color: #0000BB">url_title</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;segment_3&#125;"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"1"</span><span style="color: #0000BB">&#125;<br />Now&nbsp;you&nbsp;can&nbsp;</span><span style="color: #007700">use&nbsp;</span><span style="color: #0000BB">what&nbsp;ever&nbsp;fields&nbsp;are&nbsp;associated&nbsp;with&nbsp;that&nbsp;weblog<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;</span>
</span>
</code></div>

<p>Pass different variables to achieve what ever results you might need.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Create a “Nested” Category Select Element</title>
      <link>http://eeinsider.com/tips/view/create-a-nested-category-select-element/</link>
      <guid>http://eeinsider.com/tips/view/create-a-nested-category-select-element/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-08-07T13:19:45+00:00</dc:date>
      <content:encoded><![CDATA[<p>In a recent project, I had to create a select element that listed a group of categories. But, one category had subcategories, and they wanted that to be reflected in the select element. After scouring the documentation, I found that I can just check the parent_id of the category. If the parent_id equals 0, then it is a top level category. So if it is a subcategory, I just add in 2 spaces:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">&lt;</span><span style="color: #0000BB">select&nbsp;name</span><span style="color: #007700">=</span><span style="color: #DD0000">"category"&nbsp;</span><span style="color: #0000BB">id</span><span style="color: #007700">=</span><span style="color: #DD0000">"category"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">option&nbsp;value</span><span style="color: #007700">=</span><span style="color: #DD0000">""</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">filter&nbsp;by&nbsp;category</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">option</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">categories&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;my_weblog&#125;"&nbsp;</span><span style="color: #0000BB">style</span><span style="color: #007700">=</span><span style="color: #DD0000">"linear"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">option&nbsp;value</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;category_id&#125;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;if&nbsp;parent_id&nbsp;</span><span style="color: #007700">!=&nbsp;</span><span style="color: #0000BB">0&#125;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&#123;category_name&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">option</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">categories&#125;<br /></span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">select</span><span style="color: #007700">&gt;&nbsp;</span>
</span>
</code></div>

<p>So that would just output the list of categories, and then &#8220;nest&#8221; any subcategories.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Dropping Your Extra Relationship Fields Once Your Discover Playa</title>
      <link>http://eeinsider.com/tips/view/converting-to-playa/</link>
      <guid>http://eeinsider.com/tips/view/converting-to-playa/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-08-06T08:49:48+00:00</dc:date>
      <content:encoded><![CDATA[<p>Playa is an awesome extension&#8230; just incredible. I only wish I had it sooner so I would have had to build up to 13 Relationship Fields for one of my weblogs.</p>

<p>Once I found Playa, keeping that old system seemed ridiculous. But how to get rid of them systematically&#8230;</p>

<p>Here&#8217;s a little code I whipped up for a template to help me out:</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"your_weblog"&nbsp;</span><span style="color: #0000BB">limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"999"</span><span style="color: #0000BB">&#125;<br />&#123;if&nbsp;relationship4&#125;&#123;title&#125;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;</span><span style="color: #0000BB">4</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">br</span><span style="color: #007700">/&gt;<br /></span><span style="color: #0000BB">&#123;if</span><span style="color: #007700">:elseif&nbsp;</span><span style="color: #0000BB">relationship3&#125;&#123;title&#125;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;</span><span style="color: #0000BB">3</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">br</span><span style="color: #007700">/&gt;<br /></span><span style="color: #0000BB">&#123;if</span><span style="color: #007700">:elseif&nbsp;</span><span style="color: #0000BB">relationship2&#125;&#123;title&#125;</span><span style="color: #007700">&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;</span><span style="color: #0000BB">2</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">br</span><span style="color: #007700">/&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>It&#8217;ll print out a list of all your entries and with the # of the multiple relationships you&#8217;ve added to it.</p>

<p>Edit the entries with the highest # (in this case 4 ... but in my case it was 13) and once you get them all, you can delete relationship 13 from your weblog&#8217;s custom field. Repeat until you&#8217;ve slimmed it down to a single Playa relationship field, that handles all of them.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Structure Module: Category Pages</title>
      <link>http://eeinsider.com/tips/view/structure-module-category-pages/</link>
      <guid>http://eeinsider.com/tips/view/structure-module-category-pages/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-07-30T23:55:52+00:00</dc:date>
      <content:encoded><![CDATA[<p>To show a weblog listing in a Structure managed template you have to use dynamic=&#8220;off&#8221;. But this also means that if you use a category filter, the URL will be ignored.</p>

<p>This usually means creating a dedicated category template but this isn&#8217;t the ExpressionEngine way right?!</p>

<p>So let&#8217;s use embedded variables in the way Paul Burdick intended (I hope!)</p>

<p>Cut out your listing weblog and create a separate template (in an includes template group for example). In this example I will add it to _inc and call it _html_articles.</p>

<p>It will look something like this -</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&nbsp;weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"articles"&nbsp;</span><span style="color: #0000BB">orderby</span><span style="color: #007700">=</span><span style="color: #DD0000">"date"&nbsp;</span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"&nbsp;</span><span style="color: #0000BB">sort</span><span style="color: #007700">=</span><span style="color: #DD0000">"asc"</span><span style="color: #0000BB">&#125;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">div&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"entry"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">p&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"date"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;entry_date&nbsp;format</span><span style="color: #007700">=</span><span style="color: #DD0000">'%l,&nbsp;%F&nbsp;%d,&nbsp;%Y'</span><span style="color: #0000BB">&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">h2&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"title"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;url_title_path="</span><span style="color: #0000BB">articles</span><span style="color: #007700">/</span><span style="color: #0000BB">detail</span><span style="color: #DD0000">"&#125;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;title&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">h2</span><span style="color: #007700">&gt;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #0000BB">&#123;categories&#125;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">p&nbsp;</span><span style="color: #007700">class=</span><span style="color: #DD0000">"category"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Category</span><span style="color: #007700">:&lt;</span><span style="color: #0000BB">a&nbsp;href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;path="</span><span style="color: #0000BB">articles</span><span style="color: #007700">/</span><span style="color: #0000BB">index</span><span style="color: #DD0000">"&#125;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;category_name&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">categories&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;article</span><span style="color: #007700">-</span><span style="color: #0000BB">summary&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">p</span><span style="color: #007700">&gt;<br /><br />&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;<br /></span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">weblog</span><span style="color: #007700">:</span><span style="color: #0000BB">entries&#125;&nbsp;</span>
</span>
</code></div>

<p>Now in your index template create some conditionals and some embeds like this -</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">&#123;if&nbsp;segment_2&nbsp;</span><span style="color: #007700">==&nbsp;</span><span style="color: #DD0000">"category"</span><span style="color: #0000BB">&#125;<br />&#123;embed</span><span style="color: #007700">=</span><span style="color: #DD0000">"_inc/_html_articles"&nbsp;</span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"on"</span><span style="color: #0000BB">&#125;<br />&#123;if</span><span style="color: #007700">:</span><span style="color: #0000BB">else&#125;<br />&#123;embed</span><span style="color: #007700">=</span><span style="color: #DD0000">"_inc/_html_articles"&nbsp;</span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"</span><span style="color: #0000BB">&#125;<br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">if&#125;&nbsp;</span>
</span>
</code></div><p> </p>

<p>* Rememeber that you can change the category indicator so change the conditional to match</p>

<p>Going back to your _html_articles embedded template change the dynamic parameter from</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"&nbsp;</span>
</span>
</code></div>

<p>to</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:dynamic&#125;"&nbsp;</span>
</span>
</code></div>

<p>So what we are doing is to check the URL. If there is no category indicator then pass a variable to the embedded template that invokes dynamic=&#8220;off&#8221; which shows the initial weblog listing.</p>

<p>If the second segment has a category indicator then change dynamic to on which will then allow the URL to control the output.</p>

<p>This should also work with Calendars and maybe even the Gallery module although I haven&#8217;t tested these yet.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Tweaking the CP for productivity</title>
      <link>http://eeinsider.com/tips/view/tweaking-the-cp-for-productivity/</link>
      <guid>http://eeinsider.com/tips/view/tweaking-the-cp-for-productivity/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-07-24T15:51:58+00:00</dc:date>
      <content:encoded><![CDATA[<p>Have you ever been enjoying your favorite beverage at a fine establishment while working on your laptop, only to grimace every time you have to scroll down the screen to get to the Update button for a template.<br />
Solution: Make a copy of the buttons on top of the page.<br />
In the file: /system/cp/cp.templates.php<br />
At  Line 3139 add the code between the comments.</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">.</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input_hidden</span><span style="color: #007700">(</span><span style="color: #DD0000">'template_id'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$template_id</span><span style="color: #007700">);&nbsp;&nbsp;</span><span style="color: #FF8000">///&nbsp;Line&nbsp;3139&nbsp;<br />//////&nbsp;copy&nbsp;of&nbsp;buttons&nbsp;to&nbsp;top&nbsp;of&nbsp;page<br /></span><span style="color: #0000BB">$r&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">div</span><span style="color: #007700">(</span><span style="color: #DD0000">'templatebox'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$r&nbsp;</span><span style="color: #007700">.=&nbsp;</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">qdiv</span><span style="color: #007700">(</span><span style="color: #DD0000">'itemWrapper'</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input_submit</span><span style="color: #007700">(</span><span style="color: #0000BB">$LANG</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">line</span><span style="color: #007700">(</span><span style="color: #DD0000">'update'</span><span style="color: #007700">)).</span><span style="color: #0000BB">NBS</span><span style="color: #007700">.</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">input_submit</span><span style="color: #007700">(</span><span style="color: #0000BB">$LANG</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">line</span><span style="color: #007700">(</span><span style="color: #DD0000">'update_and_return'</span><span style="color: #007700">),</span><span style="color: #DD0000">'return'</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$r&nbsp;</span><span style="color: #007700">.=&nbsp;&nbsp;</span><span style="color: #0000BB">$DSP</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">div_c</span><span style="color: #007700">();<br /></span><span style="color: #FF8000">///////&nbsp;end&nbsp;copy&nbsp;of&nbsp;buttons&nbsp;</span>
</span>
</code></div>

<p>You will now have update buttons at the top of the form and won&#8217;t have to scroll down to update templates on wide aspect ratio or small screens.</p>

<p>I&#8217;m sure this approach can be applied in many other places.<br />
Looking forward to trying this with the new view files in v1.6.8</p>

<p>ExpressionEngine 1.6.7 Build:&nbsp; 20090211
</p>]]></content:encoded>

    </item>

    <item>
      <title>Gallery: Drop Down List of Sub Categories Only</title>
      <link>http://eeinsider.com/tips/view/gallery-drop-down-list-of-sub-categories-only/</link>
      <guid>http://eeinsider.com/tips/view/gallery-drop-down-list-of-sub-categories-only/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-07-17T02:49:07+00:00</dc:date>
      <content:encoded><![CDATA[<p>Do you use Gallery Categories just for organisation and want a drop down navigation that contains only subcategories?</p>

<p>Well here you go!</p>

<div class="codeblock"><code><span style="color: #000000">
<span style="color: #007700">&lt;</span><span style="color: #0000BB">form</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">select&nbsp;name</span><span style="color: #007700">=</span><span style="color: #DD0000">"URL"&nbsp;</span><span style="color: #0000BB">onChange</span><span style="color: #007700">=</span><span style="color: #DD0000">"window.location=this.options&#91;this.selectedIndex&#93;.value"</span><span style="color: #007700">&gt;<br />&lt;</span><span style="color: #0000BB">option&nbsp;value</span><span style="color: #007700">=</span><span style="color: #DD0000">"&nbsp;"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Category&nbsp;Jump&nbsp;Navigation</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">option</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query&nbsp;sql</span><span style="color: #007700">=</span><span style="color: #DD0000">"SELECT&nbsp;cat_id&nbsp;as&nbsp;category_id,&nbsp;cat_name&nbsp;AS&nbsp;category_name&nbsp;FROM&nbsp;exp_gallery_categories&nbsp;WHERE&nbsp;parent_id&nbsp;!=&nbsp;0"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">option&nbsp;value</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;p.ath="</span><span style="color: #0000BB">gallery</span><span style="color: #007700">/</span><span style="color: #0000BB">category</span><span style="color: #007700">/</span><span style="color: #0000BB">C&#123;category_id</span><span style="color: #007700">/</span><span style="color: #0000BB">&#125;</span><span style="color: #DD0000">"&gt;&#123;category_name&#125;&lt;/option&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&#123;/exp:query&#125;<br />&lt;/select&gt;<br />&lt;/form&gt;&nbsp;</span>
</span>
</code></div>

<p>(Remove the dot from path=)
</p>]]></content:encoded>

    </item>

    <item>
      <title>Create member groups first</title>
      <link>http://eeinsider.com/tips/view/create-member-groups-first/</link>
      <guid>http://eeinsider.com/tips/view/create-member-groups-first/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-07-09T19:15:27+00:00</dc:date>
      <content:encoded><![CDATA[<p>When creating a site, I&#8217;ll often create a special member group called something like &#8220;Client Admin&#8221; for my client because I don&#8217;t necessarily want them to have &#8220;Super Admin&#8221; access (particularly if they&#8217;re not a very tech savvy client).</p>

<p>This is one of the very first things that I do when setting up a new EE site. Several aspects of EE, such as weblog category groups, statuses, and file upload directories, have assignments for member groups. (For example, you can determine if a particular member group has access to add/edit/delete categories for a specific group).</p>

<p>If you create member groups towards the end of the development cycle, after you have all of your category groups, etc., set up, then you have to do a lot of backtracking so as to set up the necessary group assignments (which, if you&#8217;re me, means inevitably missing one or two things at first and have to go back through everything again). </p>

<p>However, if you have your member group(s) already set up&#8212;even if you don&#8217;t have all of the group&#8217;s settings configured&#8212;then you can set up the various assignments along the way. Which means less time spent backtracking when you&#8217;re towards the end of development.
</p>]]></content:encoded>

    </item>

    <item>
      <title>Change your index template type to XML, RSS, CSS, JS or static.</title>
      <link>http://eeinsider.com/tips/view/change-your-index-template-type-to-xml-rss-css-js-or-static/</link>
      <guid>http://eeinsider.com/tips/view/change-your-index-template-type-to-xml-rss-css-js-or-static/</guid>
      <description></description>
      <dc:subject></dc:subject>
      <dc:date>2009-07-02T02:51:29+00:00</dc:date>
      <content:encoded><![CDATA[<p>This wasn&#8217;t immediately apparent to me but you can change your index template type to a setting other than HTML. </p>

<p>Perfect for creating XML sitemaps or each section for your site and combining them in a <a href="http://www.sitemaps.org/protocol.php#index">sitemap index</a>.</p>

<ol>
<li>Create a new template group called xml_sitemaps</li>
<li>Select the new xml_sitemaps group</li>
<li>Click preferences</li>
<li>Change the index template type to xml</li>
<li>Click update</li>
</ol>

<p>Now you have a sitemap index you can create sub templates for each section of your site (blog, events, news, tips etc)</p>

<p>On advice from Kenny Meyers: You can easily create xml sitempas using my SEO extension <strong><a href="http://leevigraham.com/cms-customisation/expressionengine/lg-better-meta/#utm_source=eeinsider&amp;utm_medium=EE-Tip-Link&amp;utm_content=319&amp;utm_campaign=better-meta">LG Better Meta</a></strong>
</p>]]></content:encoded>

    </item>

    
    </channel>
</rss>