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

<channel>
	<title>Stofko Web Design &#187; Navigation</title>
	<atom:link href="http://stofko.ca/tag/navigation/feed/" rel="self" type="application/rss+xml" />
	<link>http://stofko.ca</link>
	<description></description>
	<lastBuildDate>Thu, 02 Feb 2012 14:46:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>WordPress Static Front Page</title>
		<link>http://stofko.ca/wordpress-static-front-page/</link>
		<comments>http://stofko.ca/wordpress-static-front-page/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 14:08:35 +0000</pubDate>
		<dc:creator>Bev</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Navigation]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://stofko.ca/?p=186</guid>
		<description><![CDATA[How to choose a static page as the main landing page on a Wordpress website and make the blog a secondary page.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-210" style="border: none; padding-right: 9px; margin-right: 2px;" src="http://stofko.ca/wp-content/uploads/2009/03/shiny-blog-icon2.jpg" alt="" width="105" height="105" />Many business owners today would like to incorporate a blog into their website. The WordPress blogging platform is a simple to use platform with thousands of template designs, making it a popular choice. However, the WordPress default configuration places the blog as the main landing page of the website. This tutorial will explain how to choose a static page as the main landing page and make the blog a secondary page.<span id="more-186"></span></p>
<p>According to the Worpress Codex, any page can be set as the front page simply by editing the settings. First you must create two pages &#8211; the html page you want to use as the main landing page (call it &#8220;Home&#8221;) and a blank blog page (call it &#8220;Blog&#8221;).</p>
<p>In the WordPress Admin interface select Settings &gt; Reading. Look for the section titled &#8220;Front page displays&#8221; and select &#8220;A static page (select below)&#8221;. In the drop-down box for front page choose your &#8220;Home&#8221; page. In the drop-down list for Posts page choose your &#8220;Blog&#8221; page.</p>
<p>You will now have a new static front page and a blog page.</p>
<p style="text-align: justify;">Finally, depending on your theme, you might have 2 navigation links to the home page. You can remove the duplicate easily by first determining the page number used for the static front page.</p>
<p style="padding-left: 30px;"><small>(From WordPress.com: You can determine the page number by going to Pages-&gt;Edit and hovering over the title of the page. The status bar of your browser will display a URL with a numeric ID at the end. This is the page ID.)</small></p>
<p style="text-align: justify;">Determine the file where the navigation is displayed (it may be header.php) and find the wp_list_pages statement. Exclude the static front page:</p>
<p style="text-align: justify;"><code>wp_list_pages('exclude=7');</code></p>
<p style="text-align: justify;">Now, if you want your home page to be more dynamic you can create a custom page template for the home page. To learn more about using page templates, visit the Codex <a href="http://codex.wordpress.org/Pages">here</a>.</p>
<p>This should be all you need to do to create a static front page and a secondary blog page. This change allows the WordPress platform to be used on most websites, with the blogging secondary to the main website content.</p>
]]></content:encoded>
			<wfw:commentRss>http://stofko.ca/wordpress-static-front-page/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Facebook Javascript (FBJS) &#8211; Mouseover Events with Animation</title>
		<link>http://stofko.ca/facebook-javascript-fbjs-mouseover-events-with-animation/</link>
		<comments>http://stofko.ca/facebook-javascript-fbjs-mouseover-events-with-animation/#comments</comments>
		<pubDate>Thu, 20 Nov 2008 19:14:45 +0000</pubDate>
		<dc:creator>Bev</dc:creator>
				<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Navigation]]></category>

		<guid isPermaLink="false">http://stofko.ca/?p=83</guid>
		<description><![CDATA[This tutorial will show you how to create a navigation menu that makes use of the Facebook Animation library and mouseover events to fade up and down hidden divs.]]></description>
			<content:encoded><![CDATA[<p>Facebook has provided a nice Animation library that can be used on applications both on and off Facebook. Detailed documentation for the library can be found <a title="FBJS/Animation" href="http://wiki.developers.facebook.com/index.php/FBJS/Animation" target="_blank">here</a>. This tutorial will show you how to create a navigation menu that makes use of the Animation library and mouseover events to fade up and down hidden divs.</p>
<p><span id="more-83"></span></p>
<p>In this example  we will create 3 buttons. Two of the buttons will open a hidden div from which other navigation options are presented, the third button will be a direct link to a new page. You can view a demo <a title="Animated Menu Demo" href="http://apps.facebook.com/example_code/animatedmenu.php" target="_blank">here</a>.</p>
<p>To begin, create the navigation menu. The first button has a hidden div with id &#8216;button1&#8242; containing 3 sub-menu items and a link to close the box. The second button also has a hidden div but this one has a lot of entires requiring a scroll bar. The third button has no sub-menu and hence no hidden div. </p>
<p><code>&lt;ul class="maintabs clearfix"&gt;<br />
  &lt;li&gt;&lt;a id='button1' href='#'&gt;First Button&lt;/a&gt;<br />
      &lt;div id='button1div' class='popup clearfix' style='position:absolute; top:100px; left:65px; height: 180px; display:none; overflow: auto'&gt;<br />
        &lt;ul&gt;<br />
           &lt;li&gt;&lt;a href="# onclick="Animation(document.getElementById('button1div')).to('height', '0px').to('opacity', 0).hide().go(); return false;"&gt;Close this window&lt;/a&gt;<br />
           &lt;li&gt;&lt;a href='page1a.php'&gt;Option A&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1b.php'&gt;Option B&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1c.php'&gt;Option C&lt;/a&gt;&lt;/li&gt;<br />
        &lt;/ul&gt;<br />
      &lt;/div&gt;<br />
  &lt;/li&gt;<br />
  &lt;li&gt;&lt;a id='button2' href='#'&gt;Second Button&lt;/a&gt;<br />
      &lt;div id='button2div' class='popup clearfix' style='position:absolute; top:100px; left:150px; height: 180px; display:none; overflow: auto'&gt;<br />
        &lt;ul&gt;<br />
           &lt;li&gt;&lt;a href="#" onclick="Animation(document.getElementById('button1div')).to('height', '0px').to('opacity', 0).hide().go(); return false;"&gt;Close this window&lt;/a&gt;<br />
           &lt;li&gt;&lt;a href='page1a.php'&gt;Option A&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1b.php'&gt;Option B&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1c.php'&gt;Option C&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1d.php'&gt;Option D&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1e.php'&gt;Option E&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1f.php'&gt;Option F&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1g.php'&gt;Option G&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1h.php'&gt;Option H&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1i.php'&gt;Option I&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1j.php'&gt;Option J&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1k.php'&gt;Option K&lt;/a&gt;&lt;/li&gt;<br />
           &lt;li&gt;&lt;a href='page1l.php'&gt;Option L&lt;/a&gt;&lt;/li&gt;<br />
        &lt;/ul&gt;<br />
     &lt;/div&gt;<br />
  &lt;/li&gt;<br />
  &lt;li&gt;&lt;a id='button3' href='anotherpage.php'&gt;Third Button&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;</code></p>
<p>Next we need some FBJS to detect when the mouse moves over the navigation links. In this example I have made each hidden div the same size so they can share the code. It would be simple to change this to use a different size/shape/fade for each div if required. The script first determines which object fired the event. It then closes all other hidden divs and fades up the required new div. </p>
<p><code>&lt;script&gt;<br />
function mouseaction(evt) {<br />
eventFiredBy_ObjectId = evt.target.getId();<br />
if (eventFiredBy_ObjectId == 'button1') targetId = document.getElementById('button1div');<br />
else if (eventFiredBy_ObjectId == 'button2') targetId = document.getElementById('button2div');<br />
 <br />
//First hide all other divs<br />
if (eventFiredBy_ObjectId != 'button1') document.getElementById('button1div').setStyle({display: 'none'});<br />
if (eventFiredBy_ObjectId != 'button2') document.getElementById('button2div').setStyle({display: 'none'});<br />
 <br />
// then make the new div visible:<br />
if (eventFiredBy_ObjectId != 'button3') {<br />
Animation(targetId).to('height', 'auto').from('0px').to('width', '150px').from('0px').to('opacity', 1).from(0).show().go();<br />
}<br />
}<br />
 <br />
//add event listener to divs (mouseover &amp; mouseout)<br />
document.getElementById('button1').addEventListener('mouseover',mouseaction);<br />
document.getElementById('button2').addEventListener('mouseover',mouseaction);<br />
document.getElementById('button3').addEventListener('mouseover',mouseaction);<br />
 <br />
&lt;/script&gt;<br />
</code></p>
<p>Facebook provides a &#8220;blind&#8221; effect which would prevent the text rolling in the box as it opens. We choose not to use it here since we need the scrollbar on the second hidden div.<br />
 <br />
Below the navigation list you need a div that has enough height to exceed the largest hidden div. This will ensure the entire hidden div will be revealed on the mouseover.</p>
<p>To navigate through the menu, the user will mouse over the tabs to open the sub-menu, if any. The sub-menu will remain displayed until the user mouses over another tab or until they select a link from the sub-menu.</p>
<p>The complete example source code is available for download in a text file <a href="http://www.stofko.ca/facebook/Examples/animatedmenu.txt" target="_self">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://stofko.ca/facebook-javascript-fbjs-mouseover-events-with-animation/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

