Jump to content

nikola

Members
  • Posts

    253
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by nikola

  1. Thank you both, I'll try it and will get back to you.
  2. How can I accomplish this kind of navigation: <ul> <li><a href="#">Top Menu Item 1</a> <ul> <li><a href="#">Submenu Item 1</a></li> <li><a href="#">Submenu Item 2</a></li> <li><a href="#">Submenu Item 3</a></li> </ul> </li> <li><a href="#">Top Menu Item 2</a> <ul> <li><a href="#">Submenu Item 1</a> <ul> <li><a href="#">Sub Submenu Item 1</a></li> <li><a href="#">Sub Submenu Item 2</a></li> <li><a href="#">Sub Submenu Item 3</a></li> </ul> </li> <li><a href="#">Submenu Item 2</a></li> </ul> </li> <li><a href="#">Top Menu Item 3</a></li> </ul> News page must not list it's children (news entries). Selected page in the tree must have an "selected" class appended to it. I've used to do it this way in WolfCMS: <ul> <li><a<?php echo url_match('/') ? ' class="selected"': ''; ?> href="<?php echo URL_PUBLIC; ?>">Home page</a></li> <?php foreach($this->find('/')->children() as $menu): ?> <?php if($menu->slug() == 'news') : ?> <li><?php echo $menu->link($menu->title, (in_array($menu->slug, explode('/', $this->url)) ? ' class="selected"': null)); ?></li> <?php endif; ?> <li><?php echo $menu->link($menu->title, (in_array($menu->slug, explode('/', $this->url)) ? ' class="selected"': null)); ?> <ul> <?php foreach($menu->children() as $child):?> <?php if($child->slug() == 'news') : ?> <li><?php echo $child->link() ?></li> <?php endif; ?> <?php if($child->childrenCount() > 0 && $child->slug() != 'news') : ?> <li><?php echo $child->link($child->title, (in_array($child->slug, explode('/', $this->url)) ? ' class="selected"': null)); ?> <ul> <?php foreach ($child->children() as $grandchild) : ?> <li><?php echo $grandchild->link($grandchild->title, (in_array($grandchild->slug, explode('/', $this->url)) ? ' class="selected"': null)); ?> <?php endforeach; ?> </ul> <?php endif; ?> <?php if($child->childrenCount() == 0) : ?> <li><?php echo $child->link() ?></li> <?php endif; ?> <?php endforeach; ?> </ul> </li> <?php endforeach; ?> </ul> Thanks
  3. Hi to all, As I've mentioned earlier to Ryan, ProcessWire runs fine on Windows 7/2008 Server setup with IIS 7.5 WebServer with IIS Mod-Rewrite from Micronovae that can read .htaccess file. The problem is that this IIS filter is free for development use on localhost without limitations but it's not free for production use on live server (it costs $150 per server license). I've found another solution that works flawlessly and it's absolutely free. Download URL Rewrite Module 2.0 for IIS from http://www.iis.net/download/urlrewrite and install it Define new web site under "sites" in IIS Manager and point it to directory where you've unzipped ProcessWire files Download web.config (translated from original .htaccess) file from this post, unzip it and put it in ProcessWire root directory Delete .htaccess file (because you don't need it any more). I hope that this will help someone if the need arises for ProcessWire use on this kind of install. web.config.zip
×
×
  • Create New...