<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Wolf CMS Forum]]></title>
		<link>http://www.wolfcms.org/forum/</link>
		<description><![CDATA[The most recent topics at Wolf CMS Forum.]]></description>
		<lastBuildDate>Tue, 24 Jan 2012 14:57:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Multilevel navigation (of sorts)]]></title>
			<link>http://www.wolfcms.org/forum/topic1991new-posts.html</link>
			<description><![CDATA[I can't figure out a good topic subject for the death of me, and I have huge trouble explaining what I'm shooting for. So, [b][url=http://www.randomgaminggroup.com/rgg]here's the link[/url][/b]: check out the navigation and how it works.

I don't know PHP. I don't. At all. I've done my best, and this is the code that I've come up with:

[code]<ul class="nav">
   <li><a href="<?php echo URL_PUBLIC; ?>">Etusivu</a></li>
        
<?php foreach($this->find('/')->children() as $menu): ?>
   <li><?php echo $menu->link($menu->title, (in_array($menu->slug, explode('/', $this->url)) ? ' class="current"': null)); ?></li>
<?php endforeach; ?>
</ul>[/code]
(for the main link list)

[code]<ul id="top-nav" class="aside">
<?php if ($this->level() >= 2) : ?>
     <li><?php echo $this->parent()->link(); ?> &nbsp; </li>
<?php endif; ?>
    
<?php if ($this->level() > 0) :?>
     <li><?php echo $this->title(); ?> &nbsp; </li>
<?php endif; ?>

<?php if($this->level() > 2) :?>
   <?php foreach ($this->find($this->parent->getUri())->children() as $sibling) : ?>
     <?php if ($this->slug() != $sibling->slug()) : ?>
       <li><?php echo $sibling->link(); ?> &nbsp; </li>
     <?php endif; ?>
   <?php endforeach; ?>
<?php endif; ?>
    
<?php if ($this->level() > 0) :?>
   <?php foreach ($this->children() as $child): ?>
      <li><?php echo $child->link($child->title, (url_start_with($child->url) ? ' class="current"': null)); ?> &nbsp; </li>
   <?php endforeach; ?>
<?php endif; ?>
</ul>[/code]
(for the navigation bar on top of the text area)

It works, but is it good and logical coding?

Plus, there's a small thing I'm not happy with, and it would be great if you could give me a hand.

Now the current page title is always the second link in the list, which makes browsing confusing when there are more than two pages listed (check out Mistä on tultu -> Maratonit -> 1. Maraton, 2. Maraton etc, you'll get it). I know this is because of the way I've called the page title, but I don't know how to fix it... As I also want the link to appear ONLY when there are child pages to list (I mean, when there would be at least one link on the navigation bar to go with the current page title). Now the current page title shows up always when the page level is more than 0, and it looks pretty stupid (check out Keistä on kyse or Lisäkivaa, for example).

I know enough to suspect that I need to change the structure of the whole thing and use much more ifs and elses, but I can't really get further without any guidance.]]></description>
			<author><![CDATA[dummy@example.com (Fortron)]]></author>
			<pubDate>Tue, 24 Jan 2012 14:57:15 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1991new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Adding automatic class to the menu item]]></title>
			<link>http://www.wolfcms.org/forum/topic1941new-posts.html</link>
			<description><![CDATA[Hi everyone,
Is there any way to add a class automatically to the menu items or link by pulling a slug?

At the moment I have:
[code]
<li><?php echo $menu->link($menu->title, (in_array($menu->slug, explode('/', $this->url)) ? ' class="current"': null)); ?></li>
[/code]

And I'd like to have a class to every <li>, something like this:
[code]
<li class="<?php echo 'SLUG' ?>"><?php echo $menu->link($menu->title, (in_array($menu->slug, explode('/', $this->url)) ? ' class="current"': null)); ?></li>
[/code]]]></description>
			<author><![CDATA[dummy@example.com (David)]]></author>
			<pubDate>Thu, 29 Dec 2011 00:12:54 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1941new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Problem with parent conditional]]></title>
			<link>http://www.wolfcms.org/forum/topic1902new-posts.html</link>
			<description><![CDATA[Hello.  I am trying to move the archive submenu to a snippet that shows on the archive page and its children.  The main reason for this is to remove any code from the sidebar pages so my client can use tinyMCE without accidentally messing the menu up.

My problem is, with the following code, my home page becomes disabled.  

[code]<?php if ($this->id() == '4' || $this->parent()->id() == '4') : ?>[/code]

The rest of the site will work, but the home page will only display the header (view source shows that everything below this line of code is omitted).  If I remove the parent conditional, and just leave the first half, it works fine.  Unfortunately the menu will not show up on the articles.  The main archive page is 4.  Obviously the monthly index and the articles are the children I want the menu to show up on as well.

Any ideas how to get this to cooperate?  Thanks.

Here is the full code I have for the menu:

[code]
<?php if ($this->id() == '4' || $this->parent()->id() == '4') : ?>
  <?php $article = $this->find('articles'); ?>
  <?php $archives = $article->archive->archivesByMonth(); ?>
  <ul class="subNav">
    <?php foreach ($archives as $date): ?>
    <li><a href="<?php echo BASE_URL . $this->url .'/'. $date . URL_SUFFIX; ?>"><?php echo strftime('%B %Y', strtotime(strtr($date, '/', '-'))); ?></a></li>
    <?php endforeach; ?>
    <li><a href="<?php echo BASE_URL; ?>articles">Archives</a></li>
  </ul>
  <?php if(url_match('/')): ?>
  <?php $page_article = $this->find('/articles/'); ?>
    <ul class="subNav">
    <?php foreach ($page_article->children(array('limit' => 10, 'order' => 'page.created_on DESC')) as $article): ?>
        <li><?php echo $article->link(); ?></li> 
    <?php endforeach; ?>
    </ul>
  <?php endif; ?>
<?php endif; ?>
[/code]]]></description>
			<author><![CDATA[dummy@example.com (MCAllinder)]]></author>
			<pubDate>Sun, 04 Dec 2011 20:44:47 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1902new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Menu with unlimited levels and children]]></title>
			<link>http://www.wolfcms.org/forum/topic337new-posts.html</link>
			<description><![CDATA[Hi modify suckerfish menu for wolf...  [url=http://wolfcms.office-web.net/extensions/trucs-et-astuces/menu-deroulant.html]it works perfectly[/url]!
So I would like to assign a CSS class for  (the same as PERCIFORMES! example) 
[b]class="daddy"[/b] for sub pages which have children

Here's the code
[code]<?php
function displayChildren($page, $current, $startmenu = true, $limits = null) {
  if ($limits != null && array_key_exists($page->slug, $limits)) {
    $arr = array('order' => 'position ASC, published_on DESC', 'limit' => $limits[$page->slug]);
  } else
    $arr = array('order' => 'position ASC, published_on DESC');
  if ($page && count($page->children()) > 0) {
    echo ($startmenu) ? '<ul>' : '';
    foreach($page->children($arr) as $menu) :
        echo '<li'.(in_array($menu->slug, explode('/', $current->url)) ? ' class="current"': null).'>'.$menu->link($menu->title);
        displayChildren($menu, $current, true, $limits);
        echo '</li>';
    endforeach;
    echo ($startmenu) ? '</ul>' : '';
  }
}
?>

<div id="container">
<h3>Pour WOLF</h3>
<?php
  $page = $this->find('/');
  echo '<ul id="nav">';
  echo '<li>'.$page->link($page->title, (in_array($page->slug, explode('/', $this->url)) ? ' class="current"': null)).'</li>';
  echo displayChildren($page, $this, false);
  echo '</ul>';
?>
</div>
</div>[/code]]]></description>
			<author><![CDATA[dummy@example.com (mvdkleijn)]]></author>
			<pubDate>Tue, 29 Nov 2011 12:46:10 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic337new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[pure css navigation]]></title>
			<link>http://www.wolfcms.org/forum/topic1731new-posts.html</link>
			<description><![CDATA[Hi,
I have searched for a working solution and tried some but does not work.
I am using this simple css menu [url]http://www.thecssninja.com/css/css-tree-menu[/url]
Could work with the sitemap snippet but should check somehow if children have some children :)
<li> should be <li class="sub"> if there are children

thanks
Gabor

[code]
<?php
function snippet_sitemap($parent)
{
    $out = ''; 
    $childs = $parent->children();
    if (count($childs) > 0)
    {
        $out = '<ol>'."\n";
        foreach ($childs as $child)
/* if ( $child->$children > 0 ) {<li class="sub">} */
            $out .= '<li>'.$child->link().'</li>'.snippet_sitemap($child).''."\n";
        $out.= '</ol>'."\n";
    }
    return $out;
}
?>
[/code]]]></description>
			<author><![CDATA[dummy@example.com (gabor)]]></author>
			<pubDate>Fri, 16 Sep 2011 21:32:50 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1731new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Navigation]]></title>
			<link>http://www.wolfcms.org/forum/topic1728new-posts.html</link>
			<description><![CDATA[On my site, joelkrausedesign.com, I have a top-border on my navigation bar and content. For the border to appear properly on my nav bar, I had to set it to 1024px, the width of the site, but now since doing that, if I do left: 200px; the whole thing moves (I already knew it would).

Question being, how do I center the link/navigation bit, without messing with the WHOLE nav bar?

Regards,
Joel.

(BTW, if this is the wrong place, feel free to move it. :) )]]></description>
			<author><![CDATA[joel@joelkrause.net (Joel_Krause)]]></author>
			<pubDate>Fri, 16 Sep 2011 16:20:51 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1728new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Template menu]]></title>
			<link>http://www.wolfcms.org/forum/topic1699new-posts.html</link>
			<description><![CDATA[I need urgent help with respect to a web template i have successfully integrated with wolf cms.everything seems to be alright except for the menu which came with several drop downs.
Find below the html menu code for the template::

[code]
<div id="mainMenu">
            <ul>
                <li class="active"><a href="#"><span>Home</span></a>
                    <ul>
                        <li class="first current"><a href="index.php">Index small header</a></li>
                        <li><a href="index-full.php">Index large header</a></li>
                        <li class="last"><a href="index-headerno.php">Index no header</a></li>
                    </ul>
                </li>
                <li><a href="#"><span>Colors</span></a>
                    <ul>
                        <li class="first"><a onclick="switchSkin('1');" href="#">Orange</a></li>
                        <li><a onclick="switchSkin('2');" href="#">Blue</a></li>
                        <li><a onclick="switchSkin('3');" href="#">Green</a></li>
                        <li class="last"><a onclick="switchSkin('4');" href="#">Black</a></li>
                    </ul>
                </li>
                <li><a href="#"><span>Pre-made pages</span></a>
                    <ul>
                        <li class="first"><a href="pre-whatwedo.php">What we do .v1</a></li>
                        <li><a href="pre-whatwedo2.php">What we do .v2</a></li>
                        <li><a href="pre-whoweare.php">Wo we are</a></li>
                        <li><a href="pre-ourclients.php">Our clients</a></li>
                        <li class="last"><a href="pre-pricetable.php">Pricetable</a></li>
                    </ul>
                </li>
                <li><a href="#"><span>Blog pages</span></a>
                    <ul>
                        <li class="first"><a href="blog-overview.php">Blog overview</a></li>
                        <li class="last"><a href="blog-detail.php">Blog detail</a></li>
                    </ul>
                </li>
                <li><a href="#"><span>Portfolio pages</span></a>
                    <ul>
                        <li class="first"><a href="portfolio-3col.php">Portfolio 3 columns</a></li>
                        <li><a href="portfolio-sidebar.php">Portfolio with sidebar</a></li>
                        <li><a href="portfolio-list.php">Portfolio list</a></li>
                        <li class="last"><a href="portfolio-detail.php">Portfolio detail page</a></li>
                    </ul>
                </li>
                <li><a href="#"><span>Gallery pages</span></a>
                    <ul>
                        <li class="first"><a href="gallery-image.php">Image gallery</a></li>
                        <li><a href="gallery-video.php">Video gallery</a></li>
                        <li class="last"><a href="gallery-mixed.php">Mixed gallery</a></li>
                    </ul>
                </li>
                <li><a href="#"><span>Misc</span></a>
                    <ul>
                        <li class="first"><a href="elements.php">Styled elements</a></li>
                        <li class="last"><a href="column-system.php">Column systems</a></li>
                    </ul>
                </li>
            </ul>
        </div><!-- end mainMenu -->
[/code]

i have used the default navigational codes to no avail

[code]
<ul>
      <li<?php echo url_match('/') ? ' class="current"': ''; ?>><a href="<?php echo
URL_PUBLIC; ?>">Home</a></li>
<?php foreach($this->find('/')->children() as $menu): ?>
      <li<?php echo in_array($menu->slug, explode('/', $this->url)) ? '
class="current"': null; ?>><?php echo $menu->link($menu->title); ?></li>
<?php endforeach; ?> 
    </ul>
[/code]

How do i use wolf cms menu for the html code above.]]></description>
			<author><![CDATA[dummy@example.com (jackie)]]></author>
			<pubDate>Sat, 03 Sep 2011 21:27:11 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1699new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Create a child menu from a parent page ID]]></title>
			<link>http://www.wolfcms.org/forum/topic1686new-posts.html</link>
			<description><![CDATA[Hello,

I'm looking for a function that can load children of a page using the parent page's ID.

I have a main menu that consists out of images and which is static but when the user mouses over the images a tree menu pops up

What I have done now is make a page for the image (Webhosting), put it on hidden and then make the extra pages under that page like:

Webhosting
-Test1
--Test1a
--Test1b
-Test2
-Test3

Now what I was thinking since Webhosting is static anyway I could use the id to load the children of it but I can't really find a function for it, just started with wolfcms this weekend :P

Thanks in advance !]]></description>
			<author><![CDATA[dummy@example.com (okyn)]]></author>
			<pubDate>Sat, 27 Aug 2011 22:28:44 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1686new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Submenu with child pages and grandchild pages as imbeded ul's]]></title>
			<link>http://www.wolfcms.org/forum/topic1661new-posts.html</link>
			<description><![CDATA[Hello,
I'm currently working on converting a static html website that I created in to a wolfCMS website; i'm not very experience in php, but i have a few different books i've been reading and using as reference. So obviously, i'm working on a menu for my website, the menu will be on all pages but the home page and will have the same basic links where ever it is.

The menu will always be formated like this:

(Current) | (Child Page) (GCh) | (Child Page)
                   (Child of Child)
                   (Child of Child)

At first I tried to make the code on my own but then i realized that i could probably modify the multilevel collapsing menu to fit my needs, since the mark up is almost identical. So I made some changes and it started to look like I thought it should but it doesn't print the children of the child pages. I know I'm missing something but i'm just not sure what, any help is appreciated.

Cookbook:Multilevel collapsing menu: [url]http://www.wolfcms.org/wiki/navbook:stacking-collapsing[/url]
Webpage with my version of the code: [url]http://waverlyxc.org/board.html[/url]]]></description>
			<author><![CDATA[dummy@example.com (mvdkleijn)]]></author>
			<pubDate>Mon, 15 Aug 2011 16:15:58 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1661new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Tree menu with nested UL's]]></title>
			<link>http://www.wolfcms.org/forum/topic1574new-posts.html</link>
			<description><![CDATA[Okay, this is what I'm trying to do, I'm new to this CMS so bear with me:

In a mockup, I got a menu list with LI's for the top level, then another ul within an li for a submenu listing a page's child. What I need, is code that will display the child menu under its top-level page, alongside the rest of the menu. A similar "tree" example on the wiki did this, but replaced the entire menu with such a thing.]]></description>
			<author><![CDATA[dummy@example.com (jackie)]]></author>
			<pubDate>Thu, 30 Jun 2011 07:18:10 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1574new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Menu subtitle]]></title>
			<link>http://www.wolfcms.org/forum/topic1196new-posts.html</link>
			<description><![CDATA[Hi guys,

First of all i'd like to say that I just simply love this CMS. Thank you so much for developing this!

Second, I would  like to ask you guys something about my menu. Currently I use the following code to accomplish what I need:

[code]
<li><a<?php echo url_match('/') ? ' class="active"': ''; ?> href="<?php echo URL_PUBLIC; ?>">Home</a></li>
<?php
function drawMenu($menu) {

    foreach ($menu as $child) {
        echo '<li>';
        if ($child->children()) {
            echo '<a href="#">'.$child->title().'</a>';
            echo PHP_EOL . '<ul>';
            if ($child->slug == 'news') { // limit news listing
                foreach ($child->children(array('limit' => 1, 'order' => 'created_on DESC')) as $kids) {
                    echo '<li>' . $kids->link($kids->title) . '</li>'  . PHP_EOL;
                }
                echo '</ul>' . PHP_EOL;
            } 
                        else { // non-archives
                drawMenu($child->children());
                echo '</ul>' . PHP_EOL;
            } // end non-archives else
        } else {  // end child-children if
            echo $child->link($child->title, (url_start_with($child->url) ? ' class="active" ': null));
        } // end else
        echo '</li>' . PHP_EOL;
    } // end child-foreach
}
$menu = $this->find('/')->children();
drawMenu($menu);
?>
[/code]

This code gives me a dropdown menu that displays the children for every parent, including the homepage. What I want to add is a subtitle for every parent page. I want this subtitle to be retrieved from the "tags" field of a page. The output should be like

[code]
<li><a href="index.html">Menu Item<span>Subtitle</span></a></li>
[/code]

Could anyone help me out with this? I've been searching for this for a while now, without any succes so far.

A big thank you in advance!]]></description>
			<author><![CDATA[dummy@example.com (sgblake06)]]></author>
			<pubDate>Wed, 08 Jun 2011 16:25:59 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1196new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Child pages as second menu]]></title>
			<link>http://www.wolfcms.org/forum/topic1454new-posts.html</link>
			<description><![CDATA[Dear Wolfs,

I try to make an homepage for my soccerclub, and now I want a second menu integrated. You can see it at: [url]http://tinyurl.com/5wkxjgu[/url]

Now, the top menu is working, but I want for each page a second menu (left Navigation box) with the childs of the current page.
For example:
When clicking on one of the Team pages (F1), the page of F1 has to open en display a second menu with the child and parent links (So, Team (on top), F1 and D1). 

Is this possible?

Hope someone can help me.

Greetings,
Jesse]]></description>
			<author><![CDATA[dummy@example.com (mvdkleijn)]]></author>
			<pubDate>Mon, 16 May 2011 21:02:44 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1454new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Excluding child of child pages from navigation]]></title>
			<link>http://www.wolfcms.org/forum/topic1440new-posts.html</link>
			<description><![CDATA[Hello, guys. I see now that i can't display the child of child pages in the navigation(dropdown menu) because of the CSS variations between the browsers. Can you have a look at the code and see how i can exclude these pages?
allNav.snippet
[code]
<?php
function displayChildren($page, $current, $startmenu = true, $limits = null) {
    if ($limits != null && array_key_exists($page->slug, $limits)) {
        $arr = array('order' => 'position ASC, published_on DESC', 'limit' => $limits[$page->slug]);
    } else
        $arr = array('order' => 'position ASC, published_on DESC');
    if ($page && count($page->children()) > 0) {
        echo ($startmenu) ? '<ul>' : '';
        foreach($page->children($arr) as $menu) :
            echo '<li'. (in_array($menu->slug, explode('/', $current->url)) ? ' class="current"': null).'>'.$menu->link($menu->title); 
            displayChildren($menu, $current, true, $limits);
            echo '</li>';
            endforeach;
        echo ($startmenu) ? '</ul>' : '';
    }
}
?>
[/code]

Header code
[code]
<div id="myslidemenu" class="jqueryslidemenu">
<?php $this->includeSnippet('allNav');
  $page = $this->find('/'); ?>
                <ul>
<li<?php echo ($this->level() == 0) ? ' class="current"': null; ?>><?php echo $page->link($page->title); ?></li>
<?php displayChildren($page, $this, false); ?>
                </ul>
    </div>
  </div>
[/code]]]></description>
			<author><![CDATA[dummy@example.com (mrnosa)]]></author>
			<pubDate>Sun, 15 May 2011 19:51:33 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1440new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Dropdown menu.]]></title>
			<link>http://www.wolfcms.org/forum/topic1395new-posts.html</link>
			<description><![CDATA[Hello. I going to make a dropdown menu, its just one problem. I don't know how. 
I don't know what to modify in the nav-code, and i don't know what to put in the CSS. 
I have tried finding it in this forum, but i have just found parts of the code.

I want the children of the main page to show on .hover. 

Can you please help me?]]></description>
			<author><![CDATA[dummy@example.com (mrnosa)]]></author>
			<pubDate>Sun, 24 Apr 2011 02:52:09 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic1395new-posts.html</guid>
		</item>
		<item>
			<title><![CDATA[Helper: Multilevel menu]]></title>
			<link>http://www.wolfcms.org/forum/topic908new-posts.html</link>
			<description><![CDATA[Hi, guys!

I have small present.

This is multilevel menu helper, that will help you to create menu. :)

You can look on it in action: [url]http://frogmenu.up.dn.ua/?about_us.html[/url] (look at sidebar menu).

[url=http://frogmenu.up.dn.ua/frogwolf-menu-helper.zip]Download multilevel menu helper[/url].

How to work with it?

Its very simply.

First you should download package and unzip Menu.php to /wolf/helpers/

Than you may go to Wolf panel and include helper to layout by:

[code]<?php use_helper('Menu'); ?>[/code]

Than you can use menu by following code:

[code]<?php

use_helper('Menu');

menu($this);

?>[/code]

Menu helper have some settings (function parameters):

[list=1]
[*]First attribute is link on object Page ($this).[/*]
[*]Second: $css_class. You can run function: menu($this, 'my-menu-clss'); and first UL tag will have class="my-menu-clss".[/*]
[*]$stop_level. If you use 2 menus (top menu and sidebar menu) and if you wan't to have menu on the first level, you can run menu function: menu($this, 'my-menu-clss', 1);[/*]
[*]You can add some tags to thre parameter for exscept pages with this tags: menu($this, 'my-menu-clss', 1, array('news', 'article'));[/*]
[/list]
Thanks.]]></description>
			<author><![CDATA[dummy@example.com (pekka)]]></author>
			<pubDate>Wed, 06 Apr 2011 13:16:01 +0000</pubDate>
			<guid>http://www.wolfcms.org/forum/topic908new-posts.html</guid>
		</item>
	</channel>
</rss>

