<?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>Train&#45;ee.com Weblog</title>
    <link>http://www.train-ee.com</link>
    <description>Learn ExpressionEngine Fast!</description>
    <dc:language>en</dc:language>
    <dc:creator>eeforme@train-ee.com</dc:creator>
    <dc:rights>Copyright 2008</dc:rights>
    <dc:date>2008-07-19T21:20:47-05:00</dc:date>
    <admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    

    <item>
      <title>Classroom Training Now Available from Train&#45;ee!</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/classroom-training-now-available-from-train-ee/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/classroom-training-now-available-from-train-ee/#When:21:35:52Z</guid>
	<description>
		<![CDATA[
			<p>I&#8217;m excited to announce that Train-ee is now offering the first &#8220;open to the public&#8221; traditional classroom training for <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a>.
</p> <p>Well - at least it will be traditional in the sense that there will be four days spent in a classroom learning EE hands-on from an experienced professional, with the ability to ask questions and interact with others in the room.
</p>
<p>
That&#8217;s where any similarity to off-site training you&#8217;ve had in the past will (hopefully) end.&nbsp; 
</p>
<p>
The first difference is the location.&nbsp; This class will be held in a vacation destination - a scenic resort town nestled close to Lake Michigan and renowned for it&#8217;s beautiful sunsets, clean beaches, bikepaths and an historic downtown with home-town coffee shops and microbreweries.
</p>
<p>
The second difference is the venue.&nbsp; We&#8217;ve all suffered through training in an instantly forgettable generic space.&nbsp; Learn ExpressionEngine in a brand-new, funky, hip and green hotel located within walking distance of restaurants and shopping.
</p>
<p>
The third difference is the after-hours activities.&nbsp; Rather than leaving you to while away the evenings alone in your hotel room, we&#8217;re planning a number of events to get you out to experience the area and hang out with the others in the class.
</p>
<p>
For more information on the location, venue, course content, and schedule/cost please visit the new <a href="http://www.train-ee.com/courseware/classroom/">classroom</a> section here on Train-ee.com.
</p>
<p>
If you have any questions not answered by that page please feel free to contact me directly via either Train-ee or Boyink.com
</p>
<p>
Sign up now - the conference room is only so big!
</p>
		]]>
	</description>       

      <dc:subject>Train&#45;ee News</dc:subject>
      <dc:date>2008-07-16T21:35:52-05:00</dc:date>
    </item>

    <item>
      <title>20 &#45; Implementing the Event Calendar Index Template</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/20-implementing-the-event-calendar-index-template/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/20-implementing-the-event-calendar-index-template/#When:21:20:47Z</guid>
	<description>
		<![CDATA[
			<p>With the <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a> calendar functionality explained, let&#8217;s dive into the code.&nbsp; In this chapter I&#8217;ll cover the implementation of the Event Calendar index template.&nbsp; From a coding perspective I&#8217;ll show how to do the basic implementation, and then use an embedded template with embedded variable to get around the &#8220;no custom field&#8221; limitation of the weblog:calendar tag.&nbsp; This chapter will also lay some groundwork for using EE&#8217;s <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/modules/weblog/related_entries.html">relationships</a> to tie events to ministries.
</p> <p><strong>Preview the Results</strong>
<br />
Before getting your hands dirty with the code, take a look at the <a href="http://church.train-ee.com/index.php/events/">completed calendar index</a> on the sample site.&nbsp; I want you to make sure it&#8217;s what you&#8217;re after before proceeding.&nbsp; You can see that EE generates the calendar view, and if you look at either July or August of 2008 there are entries that show up that display a linked title.&nbsp; At the moment the link doesn&#8217;t go anywhere - that requires a detail template that I&#8217;ll cover in the next chapter.
</p>
<p>
If you mouse over a link, you should get the browser title pop-up that displays a bit more information about the event&#8212;the start time, the duration and the location.
</p>
<p>
That&#8217;s roughly half the calendar functionality I&#8217;ll be covering in this series.&nbsp; The other half will be the detail template (that the title will link to) and implementing an events RSS feed.
</p>
<p>
If that works for you, keep reading&#8230;
</p>
<p>
<strong>Overall Implementation Steps</strong>
</p>
<ul><li>Create events weblog</li>
<li>Create events custom field group</li>
<li>Add fields to the group</li>
<li>Enter content</li>
<li>Create events template group</li>
<li>Update embeds/main_nav</li>
<li>Update stylesheet/styles</li>
<li>Add code to events/index</li>
<li>Create embeds/event_rollover_title</li></ul>
<p>
<strong>Create an Events Weblog</strong>
<br />
Event calenders in ExpressionEngine are powered by a standard weblog - so I&#8217;ve created a new weblog and named it &#8220;Events&#8221;, with a short name of &#8220;events&#8221;.&nbsp; 
</p>
<p>
<strong>Create an Events Custom Field Group</strong>
<br />
Events have their own unique data structure, so a new field group is required. Create an &#8220;Events&#8221; custom field group.
</p>
<p>
Add the following fields to the group.&nbsp; I&#8217;ve listed the field name, label, type, size and formatting options for the fields I&#8217;ve added:
</p>
<ul><li>event_duration, Event Duration, Text Input, 3, None</li>
<li>event_location, Event Locations, Drop-down List, manually populated, None</li>
<li>event_cost, Event Cost, text input, 4, none</li>
<li>event_contact_name, Event Contact Name, text input, 128, none</li>
<li>event_contact_phone, Event Contact Phone, text input 128, none</li>
<li>event_contact_email, Event Contact Email, text input, 128, none</li>
<li>event_details, Event Details, text area, 6 rows, XHTML</li></ul>
<p>
<strong>And One More</strong>
<br />
While planning this section initially I was going to tie together events and ministries using categories.&nbsp; I&#8217;m going to do a bit of a direction change and use <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/modules/weblog/related_entries.html">relationships</a> instead.&nbsp; Using categories only nets me being able to show related events on Ministry category pages&#8212;so if you view the <a href="http://church.train-ee.com/index.php/ministries/category/for-singles/">Ministries for Singles</a> I&#8217;d be able to pull the upcoming events for singles - but I see a couple of issues with that approach.&nbsp; The design of the Ministries index template doesn&#8217;t allow for another content type to display and I don&#8217;t want to go down the path of a category-specific template.&nbsp; Using categories also doesn&#8217;t easily allow me to pull ministry-specific events to a ministry detail page&#8212;and I think that&#8217;s a more helpful connection than the category level tie-in.
</p>
<p>
Relationships will let me create a direct connection between an event and a ministry.&nbsp; I&#8217;ll be able to use that connection to link from a ministry detail page to an event, and from an event detail page to the sponsoring ministry.
</p>
<p>
So I&#8217;ve added one more field to my Events field group - a relationship field:
</p>
<p>
Name:
<br />
event_sponsoring_ministry
</p>
<p>
Label:
<br />
Event Sponsoring Ministry
</p>
<p>
Field Type:
<br />
Relationship
</p>
<p>
Weblog to Create Relationship With:
<br />
Ministries
</p>
<p>
Display Criteria:
<br />
I choose &#8220;Sort by Title&#8221; in &#8220;Ascending&#8221; order
</p>
<p>
In this chapter all we&#8217;ll do is setup the field and assign a related Ministry while entering content.&nbsp; In the next chapter I&#8217;ll show how to pull related Ministry information to the Events detail view.
</p>
<p>
<strong>Connect the Field Group to the Weblog</strong>
<br />
Make sure to assign the new field group to the Events weblog via the &#8220;Edit Groups&#8221; link in Weblog Management.
</p>
<p>
<strong>Enter Content</strong>
<br />
Go ahead and post some new entries in the Events weblog. There are a couple of new things to note here:
</p>
<p>
Make sure to click the Date tab and assign choose an Entry Date that&#8217;s in the future.&nbsp; The time of the post will be used as the event starting time so round it off to a nice &#8220;top of the hour&#8221; number.&nbsp; The other new thing is to now use the relationship field - so for every post choose a sponsoring ministry in the drop-down.&nbsp; I found that putting a number of events on one date helped me with formatting the calendar visually.&nbsp; Keep in mind that you can edit your entries to assign new entry dates to move events around the calendar for formatting purposes.
</p>
<p>
<strong>Create an Events Template Group</strong>
<br />
With the content structures in place I&#8217;ll now work on pulling the content to the site.&nbsp; Create a new template group named &#8220;events&#8221;.&nbsp; Since the content is full-width like the Beliefs page, it made a good starting point - so I copied that code into the new events/index template.
</p>
<p>
<strong>Coding the Template</strong>
<br />
The first order of business is to change all references of &#8220;beliefs&#8221; to &#8220;events&#8221; - so the page title, the body id, and the variable in the main navigation embed.&nbsp; Then in the main content div you can remove all the code there entirely.
</p>
<p>
I used the <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=/docs/modules/weblog/calendar.html">calendar code from the EE documentation</a> as a starting point for my code - the &#8220;big&#8221; version which is the second example on that page.&nbsp; I also used the provided <a href="http://expressionengine.com/docs/modules/weblog/calendar_css.txt">calendar css</a> as a starting point.
</p>
<p>
After some tweaks - here is the guts of my events/index template - take a scan through it and then I&#8217;ll highlight the changes I had to make from the example code I used as a starting point:
</p>
<p>
</p><div class="codeblock"><code>
<span style="color: #007700">&lt;!--</span><span style="color: #0000BB">BEGIN CONTENT SECTION</span><span style="color: #007700">--&gt;<br />&lt;</span><span style="color: #0000BB">div </span><span style="color: #007700">class=</span><span style="color: #DD0000">"interiorBox"</span><span style="color: #007700">&gt;<br /><br /></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">calendar </span><span style="color: #007700">switch=</span><span style="color: #DD0000">"calendarToday|calendarCell" </span><span style="color: #0000BB">weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"events" </span><span style="color: #0000BB">show_future_entries</span><span style="color: #007700">=</span><span style="color: #DD0000">"yes" </span><span style="color: #0000BB">sort</span><span style="color: #007700">=</span><span style="color: #DD0000">"asc"</span><span style="color: #0000BB">&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">table id</span><span style="color: #007700">=</span><span style="color: #DD0000">"event_calendar" </span><span style="color: #0000BB">summary</span><span style="color: #007700">=</span><span style="color: #DD0000">"Church Event Calendar" </span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">tr </span><span style="color: #007700">class=</span><span style="color: #DD0000">"calendarHeader"</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">th</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">div </span><span style="color: #007700">class=</span><span style="color: #DD0000">"calendarMonthLinks"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">a href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;previous_path=events&#125;"</span><span style="color: #007700">&gt;&lt;&lt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">th</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">th colspan</span><span style="color: #007700">=</span><span style="color: #DD0000">"5"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;date format</span><span style="color: #007700">=</span><span style="color: #DD0000">"%F %Y"</span><span style="color: #0000BB">&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">th</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">th</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">div </span><span style="color: #007700">class=</span><span style="color: #DD0000">"calendarMonthLinks"</span><span style="color: #007700">&gt;&lt;</span><span style="color: #0000BB">a </span><span style="color: #007700">class=</span><span style="color: #DD0000">"calendarMonthLinks" </span><span style="color: #0000BB">href</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;next_path=events&#125;"</span><span style="color: #007700">&gt;&gt;&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;&lt;/</span><span style="color: #0000BB">th</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">tr</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;calendar_heading&#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">td </span><span style="color: #007700">class=</span><span style="color: #DD0000">"calendarDayHeading"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;lang</span><span style="color: #007700">:</span><span style="color: #0000BB">weekday_abrev&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</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">calendar_heading&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;calendar_rows &#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;row_start&#125;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">row_start&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if entries&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&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">td </span><span style="color: #007700">class=</span><span style="color: #DD0000">'&#123;switch&#125;' </span><span style="color: #0000BB">align</span><span style="color: #007700">=</span><span style="color: #DD0000">'center'</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;day_number&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;entries&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">div </span><span style="color: #007700">class=</span><span style="color: #DD0000">"event_link"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">a href</span><span style="color: #007700">=</span><span style="color: #DD0000">"#" </span><span style="color: #0000BB">title</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed="</span><span style="color: #0000BB">embeds</span><span style="color: #007700">/</span><span style="color: #0000BB">event_rollover_title</span><span style="color: #DD0000">" my_entry_id="</span><span style="color: #0000BB">&#123;entry_id&#125;</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;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&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">entries&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&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">td</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">if&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if not_entries&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&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">td </span><span style="color: #007700">class=</span><span style="color: #DD0000">'&#123;switch&#125;' </span><span style="color: #0000BB">align</span><span style="color: #007700">=</span><span style="color: #DD0000">'center'</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;day_number&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</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">if&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;if blank&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&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">td </span><span style="color: #007700">class=</span><span style="color: #DD0000">'calendarBlank'</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;day_number&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">td</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">if&#125;<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;row_end&#125;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">tr</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">row_end&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">calendar_rows&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">table</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">calendar&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br /></span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">div</span><span style="color: #007700">&gt;&lt;!--</span><span style="color: #0000BB">END CONTENT SECTION</span><span style="color: #007700">--&gt;</span>
</code></div><p>
</p>
<p>
Here are the changes I had to make from the sample code I copied from the EE docs:
</p>
<ul><li>Changed the weblog it references - to &#8220;events&#8221; in my case</li>
<li>Changed the next_path and previous_path values - and just referenced this index template</li>
<li>Added <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/modules/weblog/calendar.html#par_show_future_entries">&#8220;show_future_entries="yes&#8221;</a> to the calendar tag - otherwise the calendar will only show events for today or ones that had passed</li></ul>
<p>
With those changes I had a working basic event calendar.
</p>
<p>
<strong>Getting Tricky with Embeds</strong>
<br />
I wanted to take it a step further though and see what it would require in order to be able to pull custom fields to the calendar view - so users could get more event information without having to click through to the detail page.
</p>
<p>
Remember that the weblog:calendar tag doesn&#8217;t support custom fields by default.&nbsp; However - it does return entry_id.&nbsp; Using that as a bridge I was able to pull custom field content to the index template by using an <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/templates/embedding_templates.html">embedded template with an embedded variable</a>.&nbsp; I decided that directly displaying more content on the calendar would visually junk it up so decided to pull custom field content into the link title attribute .&nbsp; The result? Mousing over an event link will pop up the little browser tooltip and display the event start time, duration and location.
</p>
<p>
So I created a new template in my embeds group called &#8220;event_rollover_title&#8221;.&nbsp; It has the following code:
</p>
<p>
</p><div class="codeblock"><code>
<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 weblog</span><span style="color: #007700">=</span><span style="color: #DD0000">"events" </span><span style="color: #0000BB">entry_id</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed:my_entry_id&#125;" </span><span style="color: #0000BB">show_future_entries</span><span style="color: #007700">=</span><span style="color: #DD0000">"yes" </span><span style="color: #0000BB">dynamic</span><span style="color: #007700">=</span><span style="color: #DD0000">"off"<br /></span><span style="color: #0000BB">disable</span><span style="color: #007700">=</span><span style="color: #DD0000">"trackbacks|pagination|member_data|categories"</span><span style="color: #0000BB">&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;Starts</span><span style="color: #007700">:&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;</span><span style="color: #0000BB">&#123;entry_date format</span><span style="color: #007700">=</span><span style="color: #DD0000">"%g:%i%A"</span><span style="color: #0000BB">&#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">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Duration</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;event_duration&#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">hrs</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">;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Location</span><span style="color: #007700">:&amp;</span><span style="color: #0000BB">nbsp</span><span style="color: #007700">;</span><span style="color: #0000BB">&#123;event_location&#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;</span>
</code></div><p>
</p>
<p>
and then added a calling template in events/index:
<br />
</p><div class="codeblock"><code>
<span style="color: #007700">&lt;</span><span style="color: #0000BB">a href</span><span style="color: #007700">=</span><span style="color: #DD0000">"#" </span><span style="color: #0000BB">title</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;embed="</span><span style="color: #0000BB">embeds</span><span style="color: #007700">/</span><span style="color: #0000BB">event_rollover_title</span><span style="color: #DD0000">" my_entry_id="</span><span style="color: #0000BB">&#123;entry_id&#125;</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;</span>
</code></div><p>
</p>
<p>
Here&#8217;s how it works:
<br />
The parent weblog:calendar tag returns entry_id, which gets passed to this embedded template.&nbsp; This embedded template takes the entry_id and uses it as a parameter on a weblog:entries tag, which as you know returns all custom fields.&nbsp; The fields within the weblog:entries pull out the post time (used here as an event start time), duration, and location.&nbsp; This text is assembled and returned to the calling template as the link title text.
</p>
<p>
One note I need to make about this approach is that it, due to it&#8217;s nested approach, it could be resource intensive if you have a lot of calendar entries.&nbsp; For the couple of church sites I&#8217;ve been involved with, I wouldn&#8217;t be worried, as there are rarely more than a couple of entries a day.&nbsp; I&#8217;ll also - in a future chapter - cover some caching approaches that will also help mitigate any performance concerns.
</p>
<p>
<strong>Don&#8217;t Forget</strong>
<br />
Don&#8217;t forget to update embeds/main_nav to make the link to events/index live.
</p>
<p>
<strong>Companion Files</strong>
<br />
The companion file zip archive for this chapter includes
</p>
<ul>
<li>New events/index</li>
<li>Updated stylesheets/style</li>
<li>Updated embeds/main_nav</li>
<li>New embeds/event_rollover_title</li>
</ul>
<p>
Here&#8217;s a link to download the companion files: <a href="http://www.train-ee.com/images/weblog/20-Events-Index.zip">20-Events-Index.zip</a>
</p>
<p>
Next up - the events detail template.
</p>
		]]>
	</description>       

      <dc:subject>Building a Church Site</dc:subject>
      <dc:date>2008-07-19T21:20:47-05:00</dc:date>
    </item>

    <item>
      <title>19 &#45; Events Calendar Overview</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/19-events-calendar-overview/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/19-events-calendar-overview/#When:20:06:30Z</guid>
	<description>
		<![CDATA[
			<p>Most active churches will have, at any given time, a number of special events going on that need to be communicated to members and potential visitors alike.&nbsp; From a facilities perspective often there are large meeting spaces that need to have an availability calendar so members planning an event know when a particular space is available.&nbsp; <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a> has some built-in calendaring capabilities that can, at times, meet these requirements.&nbsp; In this chapter I&#8217;ll provide an overview of the EE calendaring capabilities, talk about it&#8217;s strengths and weaknesses, and cover some options to the EE calendar.
</p> <p><strong>ExpressionEngine Calendar Overview</strong>
<br />
I know a number of you have been waiting for me to get to this part of the site build&#8212;and it has me a bit worried as I&#8217;m afraid the expectation is that I&#8217;ll show how to build this really great full-featured event calendar that slices and dices event information like something from <a href="http://www.ronco.com/index.aspx">Ronco</a>.
</p>
<p>
The EE calendar just isn&#8217;t that complex, however, so I want to do a bit of work to manage your expectations before plowing into the code.&nbsp; Let me lead off with an overview of the EE&#8217;s <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/modules/weblog/calendar.html">calendar function</a> - a description I wrote in the comments on an earlier chapter in this series:
<br />
<blockquote><p>
First - imagine a weblog. Now add an entry on the weblog.&nbsp; It goes in with a publish date.&nbsp; Many blogs have those little sidebar calendars that show you when posts were made - so if you posted an entry on the 6th of March that date would then become clickable.&nbsp; Clicking on it would filter your current view down to just the entries posted on that date.
</p>
<p>
Got it?&nbsp; Now - blow up that small calendar to be full-page, post some entries with future dates, and tell EE to show entries with future dates.&nbsp; Throw the title of the post on the full-page calendar view. Link the title to another template that can show more details for one event.
</p>
<p>
That&#8217;s the essential EE calendar capability.&nbsp; It&#8217;s basic weblog post information, plotted on a calendar view,  with the ability to show entries with future dates, and link to another template that can show all the content for that one event.</p></blockquote>
<p>
<strong>Advantages</strong>
<br />
There are a number of advantages to using EE for an event calendar.&nbsp; First - you can offer content administrators a consistent publish and edit process and interface.&nbsp; Entering an event is the same as a new ministry.&nbsp; 
</p>
<p>
Second - you can take advantage of categories or relationships to group event content together with other content.&nbsp; I plan on doing that here, using relationships to tie an event to a ministry so that I can show specific upcoming events on a ministry page. 
</p>
<p>
Third - you if go down the path of memberships on your site you can allow any registered member to submit a calendar event using a <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/modules/weblog/entry_form.html">Stand-Alone Entry Form</a>.&nbsp; Those entries can then take advantage of <a href="http://www.expressionengine.com/docs/cp/admin/weblog_administration/custom_entry_statuses.html">Custom Entry Status</a> so that the new submission goes to &#8220;pending&#8221; status and doesn&#8217;t appear on the site.&nbsp; You can then implement an <a href="http://www.expressionengine.com/docs/cp/admin/weblog_administration/weblog_edit_preferences.html">Entry Notification</a> such that a calendar administrator would get an email when a new event is submitted.&nbsp; The calendar administrator would then review the event and if approved set the status to &#8220;Open&#8221; which would cause it to display on the site.
</p>
<p>
<strong>Disadvantages</strong>
<br />
The native EE calendar doesn&#8217;t do recurring or multi-day events - but there is <a href="http://lincolnite.com/ee/repeet/">a third-party plugin</a> that adds that capability - so you post an entry, some details about how it repeats, and then your event shows on the full-page calendar view multiple times.
</p>
<p>
The native <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=docs/modules/weblog/calendar.html">weblog:calendar</a> tag doesn&#8217;t support custom fields, which means that on the full-page calendar view you are limited to what can display for each event.&nbsp; Options are title, author, and entry_id. There are ways around this restriction that aren&#8217;t too hard, so I&#8217;ll cover one here.
</p>
<p>
EE&#8217;s calendar also doesn&#8217;t, inherently, work with categories. In other words, you can&#8217;t assign categories to the weblog driving your event calendar and then use native EE tags to link to a categorized view of the overall calendar.&nbsp; You can get to this functionality with a <a href="http://expressionengine.com/forums/viewthread/61910/">bit of php trickery</a>, but for this series I&#8217;ve decided to stay within the bounds of native EE functionality only.
</p>
<p>
There is no native iCal support - although there seems to be some <a href="http://expressionengine.com/forums/viewthread/33619/P18/#415850">movement in the forums around it</a>.
</p>
<p>
<strong>Options</strong>
<br />
If native EE doesn&#8217;t meet your calendaring requirements the next option I&#8217;d suggest looking at is using a Google Calendar.&nbsp; There is a relatively new <a href="http://expressionengine.com/forums/viewthread/79178/">Google Calendar Plugin</a> for pulling information from a public calendar to EE.&nbsp; However it doesn&#8217;t have much activity around it and I haven&#8217;t tested it&#8212;so don&#8217;t consider this link an endorsement.
</p>
<p>
<strong>Having Said All That</strong>
<br />
My plan here is to show the implementation of a simple event calendar using native EE tags.&nbsp; I&#8217;ll push the bounds a bit, showing how to use entry_id as a bridge to pull custom fields to the full-page calendar view.&nbsp; Other than that, this will be a very straightforward implementation.
</p>
<p>
<strong>In the Real World</strong>
<br />
My church uses the <a href="http://www.mannais.org/index.php/event_calendar/">EE calendar</a> but I have extended EE&#8217;s native functionality with the repEEt plugin linked to above.&nbsp; I also implemented a Stand Alone Entry Form with workflow to allow calendar submissions by any registered member.&nbsp; In all honesty if 10% of the events on the calendar were submitted that way it&#8217;d be great - in reality my wife and I &#8220;own&#8221; the web calendar and keep it updated based on what we hear going on while at church.
</p>
<p>
But - we&#8217;re a very small church with a small building.&nbsp; We don&#8217;t have a ton of staff, committees, or different facilities to manage.&nbsp; For us the combination of ExpressionEngine and repEET work well.
</p>
		]]>
	</description>       

      <dc:subject>Building a Church Site</dc:subject>
      <dc:date>2008-07-19T20:06:30-05:00</dc:date>
    </item>

    <item>
      <title>Integrating Monoslideshow with ExpressionEngine</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/integrating-monoslideshow-with-expressionengine/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/integrating-monoslideshow-with-expressionengine/#When:16:30:51Z</guid>
	<description>
		<![CDATA[
			<p><a href="http://www.5pieces.com/blog/monoslideshow-and-ee-gallery/">5Pieces.com</a> has an extensive tutorial on how to use Monoslideshow with the <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a> photo gallery module but I&#8217;ve had a few cases where using it with a custom weblog/custom fieldset was simpler for clients.
</p> <p>I won&#8217;t duplicate the help found at 5Pieces, or in the Monoslideshow documentation.&nbsp; All that&#8217;s really different is the code needed to pull the image and thumbnail specifications in the XML file used by Monoslideshow.
</p>
<p>
You&#8217;ll also need the &#8220;Extract URL Plus&#8221; plugin offered in <a href="http://www.expressionengine.com/index.php?affiliate=boyink&amp;page=/forums/viewthread/37056/">this EE forum thread</a>.
</p>
<p>
Note that in my case I have two fields in the photoblog: thumbnail and full_size_image.&nbsp; I don&#8217;t use captions so just plug the title in as the image title and description.&nbsp; I have MSS configured to not show this data anyway as I prefer to just let the images speak for themselves.
</p>
<p>
In order to get the XML to output correctly for Monoslideshow to parse it, I had to wrap a weblog:entries tag inside of a category:archive tag.&nbsp; There&#8217;s probably a more efficient way to do this with a custom query, but so far the performance seems acceptable.
</p>
<p>
Here&#8217;s the EE code required - keep in mind that there is more to the XML file that Monoslideshow requires.&nbsp; This code goes in the file after the &#8220;preferences&#8221; portion of the file closes.
<br />
<a href="http://www.train-ee.com/images/weblog/monoslideshow_xml.txt">monoslideshow_xml.txt</a>
</p>
<p>
Oh - this approach also assumes that all photoblog images are in the same directory.
<br />

</p>
		]]>
	</description>       

      <dc:subject>Extended Media</dc:subject>
      <dc:date>2008-07-18T16:30:51-05:00</dc:date>
    </item>

    <item>
      <title>Use Variables in Control Panel Settings</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/use-variables-in-control-panel-settings/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/use-variables-in-control-panel-settings/#When:16:11:34Z</guid>
	<description>
		<![CDATA[
			<p>Make the site launch process easier by using either the site_url or homepage variables in configuring Control Panel paths.
</p> <p>I think the site_url and homepage variables are a couple of my favorites in <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a>. I&#8217;ve found that you can actually use these in the EE Control Panel - wherever paths need to be specified.&nbsp; This includes: 
<br />
<ul>
<li>Weblog Path Settings</li>
<li>File Upload Preferences</li>
<li>Category Image URLs</li>
</ul>
<p>
Why would you want to use variables in these spots?
</p>
<p>
What happens to me quite often is - no matter how hard to I try to remember - I forget to change these paths after a site goes live.&nbsp; Then when, for example, someone uses the Search, the path of the link returned still has the &#8220;temporary&#8221; domain name in it.&nbsp; The link will still work, but it messes up your server logs and just doesn&#8217;t look as nice as getting the live URL in there.&nbsp; Or - I decide to rename &#8220;index.php&#8221; to something more semantic and then have to go find all the places where &#8220;index.php&#8221; is stored.
</p>
<p>
So - what I discovered I could do is use the variables in those settings - and then they will inherit the change to the homepage and root URL setting automatically.
</p>
<p>
So, for example, rather than having a Search Results URL setting of :
</p>
<p>
</p><div class="codeblock"><code>
<span style="color: #0000BB">http</span><span style="color: #007700">:</span><span style="color: #FF8000">//some.domain.here/index.php/template_group/template/</span>
</code></div><p>
</p>
<p>
I can specify:
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&#123;homepage&#125;</span><span style="color: #007700">/</span><span style="color: #0000BB">template_group</span><span style="color: #007700">/</span><span style="color: #0000BB">template</span><span style="color: #FF8000">/</span>
</code></div><p>
</p>
<p>
Now when I change the &#8220;URL to the root directory of your site&#8221; and the &#8220;Name of your site&#8217;s index page&#8221; under Admin  >  System Preferences  >  General Configuration all those individual weblog paths will change as well.
</p>
<p>
With some paths -like category images - you won&#8217;t want the &#8220;index.php&#8221; in there since you are referring to an image and not a template.&nbsp; In that case you can use site_url instead:
</p>
<p>
</p><div class="codeblock"><code>
<span style="color: #0000BB">&#123;site_url&#125;images</span><span style="color: #007700">/</span><span style="color: #0000BB">uploads</span><span style="color: #007700">/</span><span style="color: #0000BB">category_accessories_150</span><span style="color: #007700">.</span><span style="color: #0000BB">jpg</span>
</code></div><p>
</p>
<p>
Variables in Control Panel path settings == one less thing to worry about when launching a site == well worth it.
</p>
		]]>
	</description>       

      <dc:subject>Control Panel</dc:subject>
      <dc:date>2008-07-18T16:11:34-05:00</dc:date>
    </item>

    <item>
      <title>Member Photo Gallery in ExpressionEngine</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/member-photo-gallery-in-expressionengine/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/member-photo-gallery-in-expressionengine/#When:14:33:49Z</guid>
	<description>
		<![CDATA[
			<p>Here&#8217;s a a quick <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a> howto on creating a page showing all the photos members have uploaded to their profiles.
</p> <p>Situation:
<br />
My church - <a href="http://www.mannais.org">Manna</a> - wanted to have an &#8220;online directory&#8221; of member photos on the website.
</p>
<p>
One way to do this is to just use the Photo Gallery module and create a &#8220;members&#8221; category, upload some pics and title them with the member name.&nbsp; While this would give you a nice online directory, what it doesn&#8217;t do is integrate with the existing profiles which get linked to blog posts and comments, etc.
</p>
<p>
However,  the built in profiles don&#8217;t let you browse pictures - you can only navigate via the memberlist and click each name to view the full profile.&nbsp; The profile may or may not include a photo.
</p>
<p>
For the situation where you met someone but can&#8217;t remember their name this isn&#8217;t a great arrangement.
</p>
<p>
What you really want is the best of both options - photos stored in the profiles where members can upload and maintain them on their own, where they get linked to blog posts and comments, but also have a &#8220;gallery&#8221; page where you can browse photos to find a name.
</p>
<p>
That&#8217;s where this little howto comes in.&nbsp; Using the <a href="http://eedocs.pmachine.com/modules/query/index.html">Query Module</a> we can pull this data together in pretty short order.&nbsp; Here&#8217;s the code I used (note that I&#8217;ve removed all formatting and specific paths, so you&#8217;ll need to edit those to work on your site):
<br />
</p><div class="codeblock"><code>
<span style="color: #0000BB">&#123;exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query limit</span><span style="color: #007700">=</span><span style="color: #DD0000">"5" </span><span style="color: #0000BB">sql</span><span style="color: #007700">=</span><span style="color: #DD0000">"SELECT screen_name, bio,photo_filename, photo_width, photo_height<br />FROM exp_members <br />WHERE photo_filename &lt;&gt;'' ORDER BY screen_name "</span><span style="color: #0000BB">&#125;<br /><br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">img src</span><span style="color: #007700">=</span><span style="color: #DD0000">"yourpathhere/&#123;photo_filename&#125;" </span><span style="color: #0000BB">height</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;photo_height&#125;" </span><span style="color: #0000BB">width</span><span style="color: #007700">=</span><span style="color: #DD0000">"&#123;photo_width&#125;" </span><span style="color: #007700">/&gt;<br /></span><span style="color: #0000BB">&#123;screen_name&#125;<br />&#123;bio&#125;<br /></span><span style="color: #007700">&lt;</span><span style="color: #0000BB">a href</span><span style="color: #007700">=</span><span style="color: #DD0000">"your_path_here/index.php/member/&#123;member_id&#125;/"</span><span style="color: #007700">&gt;</span><span style="color: #0000BB">Full Profile </span><span style="color: #007700">&gt;&gt;&lt;/</span><span style="color: #0000BB">a</span><span style="color: #007700">&gt;<br /><br /></span><span style="color: #0000BB">&#123;paginate&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;</span><span style="color: #0000BB">div </span><span style="color: #007700">class=</span><span style="color: #DD0000">"paginate"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;</span><span style="color: #0000BB">span </span><span style="color: #007700">class=</span><span style="color: #DD0000">"pagecount"</span><span style="color: #007700">&gt;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">Page &#123;current_page&#125; of &#123;total_pages&#125; pages<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&lt;/</span><span style="color: #0000BB">span</span><span style="color: #007700">&gt;&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">&#123;pagination_links&#125;<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #007700">&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">paginate&#125;<br /><br />&#123;</span><span style="color: #007700">/</span><span style="color: #0000BB">exp</span><span style="color: #007700">:</span><span style="color: #0000BB">query&#125;</span>
</code></div><p>
</p>
<p>
This code:<ul><li>Only loads those members who have images</li><li>Sorts the results by screen name</li><li>Loads 4 images to a page</li><li>Adds pagination links if there are more than 4</li><li>Loads the member name and bio</li><li>Links to the standard EE profile for each member</li></ul>
<p>
Voila!
</p>
<p>
Here&#8217;s the &#8220;straight-talk&#8221; around what happened with my church and this page. This approach was my response to being asked to put together an online directory on the site - with the expectation that I would bring my camera, take pictures of people, and post them to the site.&nbsp;  I&#8217;ve consistently avoided putting myself in such roles as I don&#8217;t want to be the &#8220;website update boy&#8221; for the church.&nbsp; I&#8217;d much rather spend my time putting together ways to enable self-service for church members at large - so rather than taking on the creation and maintenance of a member photo gallery this approach put the responsibility for uploading photos in the hands of each member.
</p>
<p>
However in the end this member photo directory was one of those times when the technology was the easy part, but getting people to take action was the harder part.&nbsp; Not enough people uploaded their own picture to make this page worthwhile - so it only lasted a few months on the site.
</p>
<p>
What this tells me is that that a photo directory just wasn&#8217;t that important to enough people - otherwise they would have taken the 10 minutes to upload a photo.&nbsp; 
</p>
		]]>
	</description>       

      <dc:subject>Member Content</dc:subject>
      <dc:date>2008-07-18T14:33:49-05:00</dc:date>
    </item>

    <item>
      <title>Mixing Other Templates into Static Navigation</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/mixing-other-templates-into-static-navigation/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/mixing-other-templates-into-static-navigation/#When:19:18:20Z</guid>
	<description>
		<![CDATA[
			<p>So - you&#8217;ve used one of the approaches here on Train-ee.com to build dynamic navigation from posts in an <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a> weblog&#8212;but now you want to mix in a link to a different page type - say a contact form.&nbsp; And, you want this link to be sorted in the middle of the navigation items coming from weblog posts.&nbsp; How to do that?
</p> <p>For the purposes of demonstration, let&#8217;s assume I have an existing section of simple static content with navigation to each page showing in the sidebar.&nbsp; I now want to add a &#8220;Contact Us&#8221; page in this section,  and the page needs to have a fill in the blank form.&nbsp; I want the navigation to this new contact page to show up in the same list as the other pages in this section, but would rather use a different template to create the page.
</p>
<p>
Here&#8217;s what I would do:<ul>
<li>Create a new post in the weblog holding my static content.&nbsp; In this case I&#8217;d title it &#8220;Contact Us&#8221; which would get me a URL title of &#8220;contact_us&#8221;. Make sure to note the URL title.</li>
<li>Enter some dummy content - it won&#8217;t appear on the website so it doesn&#8217;t matter what you put in.&nbsp; I usually put a note of &#8220;Don&#8217;t delete this entry as it&#8217;s used to create navigation&#8221;.</li>
<li>Save the new entry.</li>
<li>Just for kicks, go to your site and refresh things to ensure the new entry is showing up in the navigation.</li>
<li>Now return to the template group that contains the templates used to create your static content.&nbsp; Create a new template.</li>
<li>This is the important part - <b>make sure to name the new template such that it matches the URL title as your placeholder entry</b> - so in my case the new template is called &#8220;contact_us&#8221;.</li>
<li>Add the necessary code to the new template and save it.</li>
<li>Go back to your site, navigate away from the placeholder page and click the &#8220;Contact Us&#8221; in the navigation again.&nbsp; EE should load your new template rather than the placeholder entry from the static content weblog.
</ul>
<p>
What we&#8217;re taking advantage of here is how<a href="http://www.expressionengine.com/index.php?affiliate=boyink"> EE</a> processes URLs and the order it looks for things.&nbsp; It looks for templates before content entries, so the new template will get loaded rather than the static content placeholder entry.
</p>
<p>
Overall this is just a neat little trick that lets us use weblog entries from one weblog to build navigation to a number of different templates - templates that may or may not draw content from the same weblog as the navigation comes from.
</p>
<p>
Note that you could keep all this functionality in one EE template, and use segments and conditionals to analyze the URL and either show static content or the contact form.&nbsp; How you approach the build is up to you - for me it seems each site has more or less a fixed amount of complexity, and I can either build fewer but more complex templates or more templates that are individually less complex.&nbsp; In other words -  I can squish that complexity into either a tall and narrow shape, or a short and fat shape - but the shape has the same surface area...if that makes sense.&nbsp; Often I&#8217;ll make a decision based on what&#8217;s going to be the quickest to figure out a year from now when I&#8217;ve forgotten how the site went together and have to look at the code to remember...which for me tends to be the more-but-simpler-templates approach.
</p>
		]]>
	</description>       

      <dc:subject>Static Content</dc:subject>
      <dc:date>2008-07-16T19:18:20-05:00</dc:date>
    </item>

    <item>
      <title>Three Tier Static Content in ExpressionEngine &#45; Approach D</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/three-tier-static-content-in-expressionengine-approach-d/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/three-tier-static-content-in-expressionengine-approach-d/#When:19:04:04Z</guid>
	<description>
		<![CDATA[
			<p>Here&#8217;s a fourth way to build navigation for static content in ExpressionEngine, using one weblog, one template, no categories, and relationships.&nbsp; Previously I&#8217;ve posted 3 other ways to do this on a <a href="http://www.boyink.com/splaat/static">mini-site</a>.&nbsp; The advantages to this newest approach is everything can be contained in one weblog, using one template, no categories, and one relationship field.&nbsp; Here&#8217;s a <a href="http://www.train-ee.com/courseware/static/three_tier_d/">working example</a> of this approach.
</p> <p>This method builds nicely on the &#8220;Approach-A&#8221; I&#8217;ve <a href="http://www.train-ee.com/courseware/blog/comments/no-module-required-static-content-in-expressionengine">outlined previously</a>.&nbsp; Here&#8217;s what you need to add:<ul>
<li>Another custom field, named &#8220;parent_page&#8221;.&nbsp; Make this a relationship field and specify the same weblog as this fieldset is already used in.&nbsp; Stick with the default for title, and save the new field</li>
<li>Now go through your content entries, and edit the second-level pages, assigning them to the parent-level pages.&nbsp; In my working example I have seven entries.&nbsp; I left the index entry alone, and edited pages two, three, five and six to assign them to either page one or four - which I&#8217;m arbitrarily making my second-level pages.</li>
</ul>
<p>
<b>The Code</b>
<br />
The nav-building code is a bit more complex in this case, so lets take a look at the <a href="http://www.train-ee.com/images/weblog/static_content_approach_d.txt">text version of the template</a> and go through the code.<ul>
<li>The main weblog:entries tag that builds the left nav is unchanged from Approach A</li>
<li>The first conditional looks at the value of the new parent_page field. If this is 0, that means there is no relationship setup, so this must be a parent page.</li>
<li>Each parent page gets an opening li, then the code uses <a href="http://expressionengine.com/docs/modules/weblog/reverse_related_entries.html">reverse related entries</a> to pull in all the pages that list this page as parent.&nbsp; Reverse related entries is necessary because we estabished the relationship from the perspective of the child</li>
<li>The code uses two EE variables, count and total_count, to determine when to insert the nested opening and closing ul tags.</li>
<li>Once the reverse_related_entries code is done, the closing li tag for the parent item is added.</li>
<li>The weblog entries tag closes and then the overall parent ul tag is closed.</li>
</ul>
<p>
<b>The Results</b>
<br />
The results of this approach can be seen in the <a href="http://www.train-ee.com/courseware/static/three_tier_d/">working example</a>, which renders with an index entry that&#8217;s omitted from the left-nav (the top-level of content), and a navigation bar that has two levels of pages.&nbsp; The second level links are pages with no relationships established thereby making them &#8220;parents&#8221;, and under each parent is a nested UL with it&#8217;s children (the entries where we specified a parent page).&nbsp; 
</p>
<p>
<b>Advantages</b>
<br />
<ul>
<li>Simplicity in terms of EE setup - using only one weblog and one template</li>
<li>Better usability for clients&#8212;the parent_page field appears on the Control Panel Publish form along with other fields, vs. the categories which depend on users remembering to click to another tab to assign.</li>
<li>Consistent interface for content maintenance&#8212;all using the weblog Publish page, vs. using categories where category pages have to be edited in the category interface where there is no file upload function, etc.</li>
</ul>
<p>
<b>Disadvantages</b><ul>
<li>Subpage URL structure is the same as Parent Pages&#8212;so the nav structure is not reflected in the URL structure.</li>
<li>The Parent Page drop-down won&#8217;t reflect any structure, so this approach is probably best for smaller less complex sections of content.</li>
</ul>
<p>
Overall I think this is still my favorite approach for static three-level content in EE - especially when the structure can be filled in by the site developer before the client is unleashed on the site. 
<br />

</p>
		]]>
	</description>       

      <dc:subject>Static Content</dc:subject>
      <dc:date>2008-07-16T19:04:04-05:00</dc:date>
    </item>

    <item>
      <title>Three&#45;Tier Static Content in ExpressionEngine: Approach C</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/three-tier-static-content-in-expressionengine-approach-c/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/three-tier-static-content-in-expressionengine-approach-c/#When:18:46:43Z</guid>
	<description>
		<![CDATA[
			<p>This is the fourth installment in a series on building static content areas using the native functionality in <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a>.&nbsp; 
</p>
<p>
In this post I&#8217;ll show an alternate method of presenting three-level content in EE.&nbsp;  The navigation model in this approach is less like traditional navigation and more like a weblog in that the category (2nd) level pages uses the main content area for blurbs with &#8220;Read More >>&#8220; links to the detail (3rd) level content. I use this approach sometimes because I like how it gives the user more detail as you move through the site.&nbsp; It&#8217;s also a nice way to get around needing category-index level content that often times says nothing more than &#8220;below this page are three more pages&#8221;.&nbsp; 
</p> <p><b>Implementation Note</b>
<br />
I&#8217;ve been thinking all along that this is a &#8220;3-template&#8221; approach, but I&#8217;ve realized that if I created a new template group for this example it could remain a two-template approach.&nbsp; If you watch the urls used in the working examples you&#8217;ll note this example is now in it&#8217;s own &#8220;static-c&#8221; template group.
</p>
<p>
I&#8217;ve posted both a <a href="http://www.train-ee.com/courseware/static-c/">working example</a> along with text versions of the <a href="http://www.train-ee.com/images/weblog/three_tier_c_index.txt">index template</a> and the <a href="http://www.train-ee.com/images/weblog/three_tier_c_category.txt">category page template</a>.
</p>
<p>
As before, this tutorial assumes you&#8217;ve created the ExpressionEngine weblog, category group, and field group used in the previous tutorials and will cover the incremental differences only.&nbsp; To build off Approach B to Approach C we need to:
<br />
<ul>
<li>Add a field to the Static Weblog</li>
<li>Change how the left-navigation is built on both templates</li>
<li>Modify the category template to bring in the blurbs for each detail page</li>
</ul>
<p>
<b>Adding a New Field</b>
<br />
The category pages in this approach will feature &#8220;blurb&#8221; or &#8220;page summary&#8221; type content for each detail page.&nbsp; To hold that new content we need to add a field to the Static Weblog:
<br />
<ul>
<li>In the EE Control Panel, navigate to Admin  >  Weblog Administration  >  Field Groups</li>
<li>Choose your &#8220;StaticPage&#8221; field group, and click the &#8220;Add/Edit Custom Fields&#8221; link next to it&#8217;s name.</li>
<li>Click the &#8220;Create a New Custom Field&#8221; button at the upper left of your screen.</li>
<li>Fill in the details for the new field.&nbsp; I&#8217;ve called mine &#8220;page_summary&#8221; and made it a textarea with 6 rows, with the formatting set to &#8220;None&#8221;.</li>
<li>Save your new field</li>
</ul>
<p>
<b>Changing the Left Nav</b>
<br />
For this approach, since we&#8217;re moving the links to 3rd level pages into the content area of the second-level pages, we need to change the EE tag used to build the left navigation. We&#8217;ll now use the exp:weblog:categories tag - download the text version of <a href="http://www.train-ee.com/images/weblog/three_tier_c_index.txt">new Index template</a> to get the EE code.&nbsp; Copy/paste this into your EE index template, and make sure to change things where appropriate for different weblog, template, or field names.
</p>
<p>
<b>Changing the Category template</b>
<br />
Now we need to modify the Category template - we&#8217;ll leave the exp:weblog:category_heading tag in place to bring in the Category Name and Description, but you can also get rid of this if it doesn&#8217;t suit your purpose.&nbsp; Download the text version of the <a href="http://www.train-ee.com/images/weblog/three_tier_c_category.txt">revised Category template</a>, and paste it into as your category template in EE.&nbsp; You&#8217;ll see where there is now a exp:weblog:entries tag that brings in the Page Summary and a &#8220;Read More&#8221; link for each page in this category.&nbsp; A few notes about what&#8217;s going on here:
<br />
<ul>
<li>You don&#8217;t need to add a category parameter to the weblog:entries tag - EE will do this automatically since we are on a category page.</li>
<li>Our Index entry should never show on a category page because it&#8217;s not assigned to a category.</li>
<li>The &#8220;Read More&#8221; links are pointing back to the Index template - which will load the Page Content for whatever entry you click on.</li>
</ul>
<p>
With the new field and revised EE templates in place, you should have a working static section with categories for subnav, and links to the detail pages on the Category templates.
</p>
<p>
<b>Advantages</b>
<br />
<ul>
<li>Left navigation stays simpler</li>
<li>Category pages are more detailed</li>
<li>Visitors get more info about a detail page than what just a navigation link can provide</li>
<li>Works well for presenting content that breaks up into a categorized &#8220;summary/detail&#8221; structure</li>
<li>Could be extended if necessary to use a 3rd template for the lowest-level detail</li>
<li>Still simple in that only two templates are required</li>
</ul>
<p>
<b>Disadvantages</b>
<br />
<ul>
<li>Left navigation isn&#8217;t all-inclusive&#8212;you can&#8217;t jump directly from a 3rd-level page in one category to a 3rd-level page in another category</li>
<li>Category pages have a different content structure than detail pages&#8212;may not work for all content types</li>
</ul>
<p>
<b>Extending This Approach</b>
<br />
I&#8217;ve purposefully kept things simple here just for the sake of the tutorial, but I&#8217;m can already see where this approach could be improved upon - and that&#8217;s adding &#8220;sideways&#8221; navigation to other pages in the same category when you&#8217;re on a detail page.&nbsp; That would be easily do-able using another exp:weblog:entries tag on the Index template, configured to use the  <a href="http://expressionengine.com/docs/modules/weblog/parameters.html#related_categories_mode">Related Categories Mode</a>.&nbsp; Since the Index content doesn&#8217;t have a category assigned this tag would not return anything, but while viewing an entry that&#8217;s been assigned to a category it would return links to the other pages in that category.&nbsp; You can see an example of this approach in action on <a href="http://tsg.spectrumdesigngroup.com/sg.php/services/audio/">this Client site</a> - the second-level navigation are all EE categories, and the links on the bottom of the page are to other pages in the current category.
</p>
		]]>
	</description>       

      <dc:subject>Static Content</dc:subject>
      <dc:date>2008-07-16T18:46:43-05:00</dc:date>
    </item>

    <item>
      <title>Three&#45;Tier Static Content in ExpressionEngine: Approach B</title>
      <link>http://www.train-ee.com/courseware/free_tutorials/comments/three-tier-static-content-in-expressionengine-approach-b/</link>
      <guid>http://www.train-ee.com/courseware/free_tutorials/comments/three-tier-static-content-in-expressionengine-approach-b/#When:18:28:04Z</guid>
	<description>
		<![CDATA[
			<p>This is the third installment in a series on building static content areas using the native functionality in <a href="http://www.expressionengine.com/index.php?affiliate=boyink">ExpressionEngine</a>.&nbsp; Previously I&#8217;ve covered a simple two-tier approach for content with an &#8220;index and sub-page&#8221; structure.&nbsp; Then I covered how to use EE categories to add a third level into the sub-navigation.&nbsp; That approach uses categories to organize the sub-navigation, but doesn&#8217;t provide true second-level category content. In this post I&#8217;ll show how to add that second level content using another EE template.
</p> <p>I&#8217;ve posted both a <a href="http://www.train-ee.com/courseware/static/three_tier_b/">working example</a> and text versions of both the <a href="http://www.train-ee.com/images/weblog/three_tier_b.txt">index</a> and <a href="http://www.train-ee.com/images/weblog/three_tier_b_category.txt">category</a> EE templates.
</p>
<p>
Once again I&#8217;m going to assume you have created the EE elements covered in the first two tutorials, and only cover the incremental differences to now move to this level of static content.&nbsp; To use this approach after building Approach A we need to:
<br />
<ul>
<li>Enter category-level content.</li>
<li>Edit the category archive tag in the Index template to add links to the new Category template.</li>
<li>Create a Category template to display category content.</li>
</ul>
<p>
<b>Enter the Category Content </b>
<br />
For the category content we&#8217;ll use the additional Category field of Description.&nbsp; You can also use the image field, but I&#8217;m not for this tutorial.&nbsp; To add or edit the category descriptions:
<br />
<ul>
<li>Navigate to the Admin  >  Weblog Administration  >  Category Groups area of the EE Control Panel.</li>
<li>Click the &#8220;Add/Edit Categories&#8221; link next to your static category group.</li>
<li>Click the &#8220;Edit&#8221; link next to a category.</li>
<li>Enter content in the category description - this will essentially be the same as content in the &#8220;page_content&#8221; area of a weblog entry.</li>
<li>Save your changes.</li>
<li>Repeat for each category.</li>
</ul>
<p>
<b>Edit the Index Template</b>
<br />
All we need to do in the index template is edit the weblog:category_archive archive tag to add links inside the categories loop.&nbsp; Download the text version of the revised <a href="http://www.train-ee.com/images/weblog/three_tier_b.txt">Index</a> template to get the new code.&nbsp; You&#8217;ll note the links are to a template called &#8220;snow&#8221; - since my categories are different types of snow I named the category template to suit.&nbsp; You can change the link to point to a more aptly-named template for your needs.
</p>
<p>
<b>Create a Category Template</b>
<br />
Now that we have links pointing to a category template, we need to create that template.&nbsp; Download the text version of my <a href="http://www.train-ee.com/images/weblog/three_tier_b_category.txt">category</a> template and paste it into EE as a new template.&nbsp; Note that if you changed the links from &#8220;snow&#8221; to something else in the previous step, you&#8217;ll need to name the template to match in this step.
</p>
<p>
The main difference in this category template is the EE tag used in the content div.&nbsp; Rather than pulling a weblog entry, we&#8217;re using the category_heading tag to pull the category name, description and image fields.&nbsp; There is a simple conditional there that only pulls the category description if there is content in that field.&nbsp; 
</p>
<p>
Note that the code that creates the left navigation is the same code as in the index template.&nbsp; I&#8217;ve left this so that these tutorial templates would be more self-contained, but in practice I&#8217;d pull that code, stick it in it&#8217;s own template, and embed it back into this template.&nbsp; 
</p>
<p>
At this point you should have a working 3-tier static content setup in ExpressionEngine.
</p>
<p>
<b>Advantages</b>
<br />
<ul>
<li>True three-level navigation and content</li>
<li>Still pretty simple overall with two templates required</li>
</ul>
<br />
<b>Disadvantages</b>
<br />
<ul>
<li>Two different content editing workflows, depending on the content level in navigation</li>
<li>The category description field doesn&#8217;t offer the same formatting options as a weblog field, so either the content has to be simpler or clients need to enter some markup</li>
<li>The category image field (not used in this tutorial) doesn&#8217;t offer a file upload or browse button, so image paths need to be entered manually - which isn&#8217;t client friendly.</li>
</ul></p>
		]]>
	</description>       

      <dc:subject>Static Content</dc:subject>
      <dc:date>2008-07-16T18:28:04-05:00</dc:date>
    </item>

    
    </channel>
</rss>