Recent Posts of Frog CMS in Inline Navigation http://forum.madebyfrog.com/rss en-us 25 Inline Navigation <p><code>mvdkleijn, </code>David, it&#8217;s cool, thanks. :)</p> Thu, 18 Sep 2008 01:59:54 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_3125 jMas http://forum.madebyfrog.com/topic/463?page=1#post_3125 Inline Navigation <p>@jMas &#8211; you can still find a <a href="http://forum.madebyfrog.com/topic/214" rel="nofollow">massive pagination thread</a> which gives you the code and solves some problems. This solution still needs some help, but it works! You can see it at work on the <a href="http://erajad.byethost10.com/articles" rel="nofollow">Articles page</a> of my TestFrog site.</p> <p>@mvdkleijn &#8211; glad you don&#8217;t mind me hacking your code! ;) I wanted to find some way of having at least a minimal &#8220;foolproof&#8221; navigation level that could work to any level. At the moment, Frog&#8217;s &#8220;out-of-the-box&#8221; navigation just gets to &#8220;child&#8221; level (from &#8220;home/top&#8221;), and I wanted it to work down to &#8220;grandchild&#8221; and &#8220;great-grandchild&#8221;, etc., without any need for adjustments. The one drawback of this method is that if there are a <span class="caps">LOT</span> of child pages, then the options to the right of the inline-nav could be far too long!</p> <p>And looking forward to seeing your new, <em>even</em> better site!</p> Wed, 17 Sep 2008 13:19:33 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_3119 David http://forum.madebyfrog.com/topic/463?page=1#post_3119 Inline Navigation <p>@David &#8211; nice&#8230; didn&#8217;t find this before. I think I can use this on my private site. I&#8217;m doing a massive restyling of my site and when I&#8217;m finished it&#8217;ll be like night and day. :-)</p> Wed, 17 Sep 2008 12:40:00 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_3117 mvdkleijn http://forum.madebyfrog.com/topic/463?page=1#post_3117 Inline Navigation <p>@jmas &#8211; there is a pagianation helper if I&#8217;m not mistaken, so you should be able to use that&#8230; look through the helpers directory in your frog installation. Before actually using a helper, you&#8217;ll need to do:</p> <pre><code>&lt;?php use_helper('pagianation'); ?&gt; </code></pre> <p>hopefully I spelled pagianation correctly. :-p</p> Wed, 17 Sep 2008 12:37:11 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_3116 mvdkleijn http://forum.madebyfrog.com/topic/463?page=1#post_3116 Inline Navigation <p>And what about page navigation bar like &#8220;&lt;&lt; &lt; 1 2 3 4 &#8230; 10 11 &gt; &gt;&gt;&#8221;.</p> <p>I think it can be realized by the insertions of points of break in content of page.</p> Wed, 17 Sep 2008 10:29:32 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_3110 jMas http://forum.madebyfrog.com/topic/463?page=1#post_3110 Inline Navigation <p>For reference - I found <a href="http://www.vanderkleijn.net/frog-cms/snippets-archive/simplistic-menu.html">mvdkleijn's code</a> that this is based on, in case anyone is interested.</p> Thu, 21 Aug 2008 14:46:17 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_2644 David http://forum.madebyfrog.com/topic/463?page=1#post_2644 Inline Navigation <p>P.S. An earlier menu layout by mvdkleijn inspired some of this.</p> <p>Also, it tests to see if you're at the top or bottom of the tree, and adds the left/right arrows (or not) accordingly.</p> <p>FWIW!! Perhaps not much....</p> Thu, 21 Aug 2008 13:45:41 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_2643 David http://forum.madebyfrog.com/topic/463?page=1#post_2643 Inline Navigation <p>The <a href="http://forum.madebyfrog.com/topic/446" rel="nofollow">&#8216;set base for breadcrumbs&#8217; thread</a> started me thinking about an alternative form of &#8220;inline&#8221; navigation, on analogy to breadcrumbs. This is what I came up with:</p> <pre><code>Parent ← ThisPage → » Child1 | » Child2 | » Child3 | </code></pre> <p>Of course, you could set up the separators however you like. This is the code (although everybody here knows more <span class="caps">PHP</span> than I do!!). Use this in your <strong>Layout</strong> (it won&#8217;t be able to keep track if you use it in a snippet):</p> <pre><code>&lt;div id="inlineNav"&gt; &lt;p&gt; &lt;?php if ($this-&gt;level() != 0) { echo $this-&gt;parent-&gt;link($this-&gt;parent-&gt;title()).' ← '; } ?&gt; &lt;?php echo $this-&gt;title(); ?&gt; &lt;ul&gt; &lt;?php if (count($this-&gt;children()) &gt; 0) { echo ' → '; foreach($this-&gt;children() as $inlineMenu): echo '&lt;li&gt;» '.$inlineMenu-&gt;link($inlineMenu-&gt;title, (in_array($inlineMenu-&gt;slug, explode('/', $this-&gt;url)) ? ' class="current"': null)).' |&lt;/li&gt;'; endforeach; }; ?&gt; &lt;/ul&gt; &lt;/p&gt; &lt;/div&gt;&lt;!-- end #inlineNav --&gt; </code></pre> <p>And this is the <span class="caps">CSS</span> I used:</p> <pre><code> /* INLINENAV */ #inlineNav { margin-top: 10px; } #inlineNav p { display: inline; } #inlineNav ul, #inlineNav li { display: inline; list-style: none; margin: 0; padding: 0; } </code></pre> <p>It ends up looking something like this:</p> <p><img src="http://farm3.static.flickr.com/2087/2784821048_813af3977d_o.png" alt="" /></p> <p>And it is currently working at <a href="http://erajad.freehostia.com/" rel="nofollow">TestFrog2</a>. And I sure hope I got all that Markdown correct!! :P</p> Thu, 21 Aug 2008 13:44:29 +0000 http://forum.madebyfrog.com/topic/463?page=1#post_2642 David http://forum.madebyfrog.com/topic/463?page=1#post_2642