Jump to content

Search the Community

Showing results for tags 'navigation'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to ProcessWire
    • News & Announcements
    • Showcase
    • Wishlist & Roadmap
  • Community Support
    • Getting Started
    • Tutorials
    • FAQs
    • General Support
    • API & Templates
    • Modules/Plugins
    • Themes and Profiles
    • Multi-Language Support
    • Security
    • Jobs
  • Off Topic
    • Pub
    • Dev Talk

Product Groups

  • Form Builder
  • ProFields
  • ProCache
  • ProMailer
  • ProDrafts
  • ListerPro
  • ProDevTools
  • Likes
  • Custom Development

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 35 results

  1. Anyone else looking for a solution for bootstrap navigation? I have found this wiki but it´s not working: http://wiki.processwire.com/index.php/Bootstrap_Navbar#The_Navbar Here is my modified solution, I hope there are no bug´s. The Navbar <nav class="navbar navbar-default"> <div class="container-fluid"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false"> <span class="sr-only">Navigation ein-/ausblenden</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#"><img src="#" alt="Logo"></a> </div> <div lass="collapse navbar-collapse" id="bs-example-navbar-collapse-1"> <?php include("topnav.inc"); ?> </div><!--/.nav-collapse --> </div> </nav><!-- /navbar --> The Menu content of ('topnav.inc') <?php /* Navigation for ProcessWire using the Bootstrap 3.5 markup This menu was written by Soma based on work by NetCarver and a bit thrown in by Joss | modified by David Schmidt */ function renderChildrenOf($pa, $output = '', $level = 0) { $output = ''; $level++; foreach($pa as $child) { $atoggle = ''; $class = ''; if ($child->numChildren && count($child->parents) == 1) { $class .= 'dropdown'; $atoggle .= ' class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" '; } else if($child->numChildren && $child->id != 1){ $class .= 'dropdown-menu'; } // Makes the current page and it's top level parent add an active class $class .= ($child === wire("page") || $child === wire("page")->rootParent) ? " active" : ''; $class = strlen($class) ? " class='".trim($class)."'" : ''; if ($child->numChildren && count($child->parents) >= 1) { $output .= "<li$class><a href='$child->url'$atoggle>$child->title<span class='caret'></span></a>"; } else{$output .= "<li$class><a href='$child->url'$atoggle>$child->title</a>";} // If this child is itself a parent and not the root page, then render it's children in their own menu too... if($child->numChildren && $child->id != 1) { $output .= renderChildrenOf($child->children, $output, $level); } $output .= '</li>'; } $outerclass = ($level == 1) ? "nav navbar-nav" : 'dropdown-menu'; return "<ul class='$outerclass'>$output</ul>"; } // bundle up the first level pages and prepend the root home page $homepage = $pages->get(1); $pa = $homepage->children; $pa = $pa->prepend($homepage); // Set the ball rolling... echo renderChildrenOf($pa); ...do something great with it. Regards David
  2. Hi, Please take a look at this: https://templatemag.com/demo/Good/ The upper nav bar, including dropdowns like "pages" and "portfolios", what do you call this whole thing? At first I guess it's called "dropdown nav bar", but seems not. AND of course, what's the simplest way/module to achieve this in PW? Thanks in advance.
  3. Reference: PW 3.0.111 and uikit3 based site using the Regular-Master profile. I was wondering if there is a way to restrict user navigation to specific pages. Login (home.php - not to be displayed) |__ About (not to be displayed) |__ Clubs (not to be displayed) | |__ Club (to be displayed) | |__ Club Members (to be displayed) |__ League (not to be displayed) | |__Season (not to be displayed) | |__ Match (not to be displayed) |__ News (blog.php - to be displayed) | etc, etc Based on the above the navigation needs to appear simply as: --------------------------------------------------------------------------- Club Club Members News --------------------------------------------------------------------------- Any thoughts appreciated.
  4. Hi Trying to setup a customized navigation. Page tree looks like this: home – upcoming exhibitions –– exhibition 1 –– exhibition 2 –– … – about – archive –– arch 1 –– arch 2 –– … – impressum Now I'd like to have a navigation, that lists only the subnav of "upcoming exhibitions" but not the one of "archive". I modified a snippet I found here in the forum. It looks like this so far: <nav class="mainNav"> <ul> <?php $homepage = $pages->get('/'); // first item links to the homepage echo "<li><a href='$homepage->url'>Aktuelle Ausstellung / current exhibition</a></li>"; $children = $homepage->children(); // render an <li> for each top navigation item foreach ( $children as $child ) { if ( $child->id == $page->rootParent->id ) { // this $child page is currently being viewed (or one of it's children/descendents) // so we highlight it as the current page in the navigation echo "<li class='active'><a href='$child->url'>$child->title</a></li>"; // if upcoming page has children, list them } elseif($child->id == 1020 && count($child->children)){ // build the subnav and list all items echo "<li><a href='$child->url'>$child->title</a><ul class='upcoming'>"; foreach($child->children as $c){ echo "<li><a href='$c->url'>$c->title<br>{$c->date_from}–{$c->date_to}</a></li>"; } echo "</ul><li>"; // otherwise list only main items } else { echo "<li><a href='$child->url'>$child->title</a></li>"; } } ?> </ul> </nav> This puts out the navigation as wanted, but only for main items (see fig. nav-open.png). As soon as "upcoming exhibitions" or one of its children is active, the navigation collapses (see fig. nav-closed.png). I cannot find out, where I went the wrong way. Thanks for help.
  5. Aligator (wip) Processwire Module to render a nested tree starting from a single root or an array of pages. Aligator is similar to MarkupSimpleNavigation but has a different approach of how to define the markup for your menu. It doesn't assume any markup or classes. It's up to you to define them where needed. It's less plug and play and requires some more advanced knowledge of ProcessWire, as some additional setup and coding is needed. But allows for powerful and easier customization without using hooks. Aligator uses callback functions to achieve this. Additionally a selector can be used to filter the children for your navigation. Note: This module is a fun project trying to find simple configurable method to render navigations. It's a work in progress and there might be major changes to how the module works. See further infos and examples on the repository: https://github.com/somatonic/Aligator
  6. FIRST: I am brand new and am trying to add a Navigation Tree to the beginner site. When I put renderNavTree($page, 4) into _head.php, I get a menu list like the graphic. This is great EXCEPT, I don't know how to make a horizontal menu out of it with CSS. Can someone help (please) or direct me to an example of the css? SECOND: That list is great for the Home page but when I click "program," the list only shows: How can I get the whole (visible) menu on every page? Thank you in advance! jim
  7. Hello! I'm currently trying to create a navigation menu using list items and I'm having issues pulling children pages properly and I'm hoping someone can point me in the right direction. The code below was modified from the default (intermediate) template that outputs child pages of the main page. (Home -> About, SiteMap). But one of the children (About page), also has 3 child pages and I'm not sure how to also get those 3 additional child pages to display as well within the same foreach statement. Because of the way the menu is structured I would need to change the output of the HTML for any Child Page with additional Children (it nests underneath in the nav). Currently only Home, About and Sitemap appear and I want to also include the child pages of About nested properly within the navigation. Current code, only accounting for Homepage and it's children. Works great and as expected: Home About Sitemap <!-- START SIDEBAR MENU --> <div class="sidebar-menu"> <!-- BEGIN SIDEBAR MENU ITEMS--> <ul class="menu-items"> <?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { echo "<li class=''><a href='$item->url'><span class='title'>$item->title</span>"; // Grab first two letters of page to output for menu icon and set active class if($item->id == $page->rootParent->id) { echo "</a><span class='bg-success icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } else { echo "</a><span class='icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } } ?> </ul> <div class="clearfix"></div> </div> <!-- END SIDEBAR MENU --> Modified not working markup trying to also nest children of a child: Home About Page1 Page2 Page3 SiteMap <!-- START SIDEBAR MENU --> <div class="sidebar-menu"> <!-- BEGIN SIDEBAR MENU ITEMS--> <ul class="menu-items"> <?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { echo "<li class=''><a href='$item->url'><span class='title'>$item->title</span>"; // check if a top navigation item's visible children has child pages // if true, change markup of top navigation item to account for nested children if(($homepage->children)->hasChildren()) { //change menu item to menu item /w sub-items echo "<li class=''><a href='javascript:;'><span class='title'>$item->title</span> <span class='arrow'></span></a><span class='icon-thumbnail'><i class='pg-form'></i></span>"; //loop through the top navigation child's children pages and output them as nested menu item foreach($child->children as $childitem) { echo "<ul class='sub-menu'>"; echo "<li class=''><a href='$childitem->url'>$childitem->title</a>"; echo "</a><span class='icon-thumbnail'>"; echo substr($childitem->title, 0, 2); echo "</span></li></ul></li>"; } } //step back out and continue listing Homepage Children pages if($item->id == $page->rootParent->id) { echo "</a><span class='bg-success icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } else { echo "</a><span class='icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } } ?> </ul> <div class="clearfix"></div> </div> <!-- END SIDEBAR MENU --> Any insights would be appreciated! I'm also sure the php code itself can be refactored better but still learning for now.
  8. Hello everyone, i have written a simple function to render the Navigation for my "Onepager" Here is the code: <?php function renderOnepagenav($onepageroot) { $sections = $onepageroot->children; echo "<ul>"; $id = ''; foreach ($sections as $item) { $id ++; echo "<li><a href='#section-$id'>$item->title</a></li>"; } echo "</ul>"; } Every Sektion is a child-page of home in the backend. It works fine but i would like to add two modifications, where i need your help: 1. i would like to skip the first (child-)page. 2. I would like to add a class only to the first rendered <li> Element. All kind of advice is highly appreciated. Thank you, Gregor
  9. Hi, I've been on this for the past couple of hours but can't translate something from a template into a function. I want to print a menu like this: Link 1 Link 2 (active) - Link 2.1 - Link 2.2 Link 3 Link 4 OR Link 1 Link 2 - Link 2.1 (active) - Link 2.2 Link 3 Link 4 ...where the child links are visible when on the parent page AS WELL AS when on a child page. I had this in a template: // main.php <div id="main-menu-wrapper"> <div class="container"> <nav id="main-menu"> <?php $arr = $home->and($home->children); echo renderMenu($arr); ?> </nav> </div> </div> <!-- sub navigation --> <?php if (!($page->id == 1)): ?> <?php if ($page->numChildren > 0): ?> <div id="sub-menu-wrapper"> <div class="container"> <nav id="sub-menu"> <?php echo renderMenu($page->children); ?> </nav> </div> </div> <?php endif; ?> <?php if (count($page->parents) > 1): ?> <div id="sub-menu-wrapper"> <div class="container"> <nav id="sub-menu"> <?php echo renderMenu($page->parent->children); ?> </nav> </div> </div> <?php endif; ?> <?php endif; ?> ...and the function was this: /** * Render navigation from array of pages * * @param PageArray $items * @param $menuClassName * @return string * */ function renderMenu($items) { // if we were given a single Page rather than a group of them, we'll pretend they // gave us a group of them (a group/array of 1) if($items instanceof Page) { $items = array($items); } $str = ''; foreach ($items as $item) { if ($item->showInMenu == true) { $menuText = $item->get('menuLinkTitle|title'); $currentClass = ''; if ($item->id == wire('page')->id) { $currentClass .= "class=\"current\" "; } elseif (wire('page')->parents->has($item) && !($item->id == 1)) { $currentClass .= "class=\"current-parent\" "; } else { $currentClass .= ''; } $str .= "<li><a " . $currentClass . "href=\"$item->url\">$menuText</a></li>"; } } // if output was generated above, wrap it in a <ul> if ($str) { $str = "<ul>$str</ul>"; } return $str; } Now I've changed my layout and want just a single menu, but with the same functionality. I'm doing it like this: // main.php <nav id="main-menu"> <?php $arr = $home->and($home->children); echo renderMenu($arr); ?> </nav> ...with a function like this: /** * Render navigation from array of pages * * @param PageArray $items * @param $menuClassName * @return string * */ function renderMenu($items) { // if we were given a single Page rather than a group of them, we'll pretend they // gave us a group of them (a group/array of 1) if($items instanceof Page) { $items = array($items); } $str = ''; foreach ($items as $item) { if ($item->showInMenu == true) { $menuText = $item->get('menuLinkTitle|title'); $currentClass = ''; if (wire('page')->id == $item->id) { $currentClass .= "class=\"current\" "; } elseif (wire('page')->parents->has($item) && !($item->id == 1)) { $currentClass .= "class=\"current-parent\" "; } else { $currentClass .= ''; } $str .= "<li><a " . $currentClass . "href=\"$item->url\">$menuText</a>"; if (!(wire('page')->id == 1)) { if (wire('page')->id == $item->id) { $str .= renderMenu($item->children); } // if the current page has omre than 1 parent (i.e. on level 2) if (count(wire('page')->parents) > 1) { // send array of the children of the current pages parent to renderMenu $str .= renderMenu(wire('page')->parent->children); // this is where the function poos the bed } } $str .= "</li>"; } } // if output was generated above, wrap it in a <ul> if ($str) { $str = "<ul>$str</ul>"; } return $str; } So it works ok when on 'Link 2', you get 'Link 2.1' and 'Link 2.2' printed in a nested list. However, clicking on Link 2.1 or Link 2.2, just a spinning wheel in the browser and a timeout, like I'm stuck in an infinite loop. It's obviously wrong, but can someone please explain what's wrong with it? Why does: <?php echo renderMenu($page->parent->children); ?> ...work in the template, but: $str .= renderMenu(wire('page')->parent->children); ...fails in my function? A bit confused here. Any help is much appreciated. Thanks.
  10. I've got my first Processwire site all set up and everything was pretty much straight forward, but I am stuck on literally the last thing I have to do which is locking down some of the features within the admin area. I have three users, a Superuser, an Admin and a guest. The Superuser account is for me so that I can make higher level changes, and the regular Admin user is for the person who manages the copy on the site, so ideally they will only have the ability to add, edit or delete pages, and not be able to mess with any of the settings such as templates or fields. So I would like to be able to hide three of the top navigation tabs from the Admin user (Setup, Modules and Access). I've tried making the pages hidden in their settings tabs, but even as the Superuser, the page is locked for edits.
  11. I'm wondering if anyone else has attempted this before. I've setup a basic test multisite installation that effectively includes the master site and 3 others subsites using either the basic or intermediate template. I can't remember which and there might even be a mix of both among them, but I don't think that should cause an issue. What I want to achieve is a Home tab in the navigation menu on each of the subsites that links directly to the Home page of the master site. Is it possible to do that within the processwire admin or is it something that is going to have to be hardcoded into the template file. If the latter, do I go about that as I cannot see anything that appears to relate to the navigation in each of the site directories. i.e. Is it possible to add a menu item to the left of the subsite "Home" page now named About that is simply a link named "Home" that redirects to the Home page of the master website? Any thoughts would be greatly appreciated.
  12. Hi there, i just want to share the code of what the subject line says. The pages to appear in the menu have a custom field "in_main_menu" of type checkbox checked. The item <li>s of the actually shown page and in the direttissima upwards - except home - get the class "current". The item <ul>s of submenus get the class "submenu". This is basically Ryans Code from here run through a meatgrinder. I hope useful for any beginners like me looking for a solution to a similar problem. Any improvement welcome! Now the code: /** * A recursive menu containing home. (It is added to the list of menu items while $level =1). * In order to be included, a page must have a custom field "in_main_menu" of type "checkbox", * and the latter has to be checked. * All submenu <ul>s get class "submenu". * All <li>s in the direttissima upwards of the page shown - except home - get the class "current". * Takes $root out of the recursion in order to not have all pages twice. * All menu items, that have children, do not have a link to their content, but act merely as switches. * You can switch this behaviour off by replacing * * $href = ( $item == $root || !$item->numChildren ? "$item->url" : "#" ); * * with * * $href = $item->url; * * Or you can make it conditional by querying a second custom field "has_own_page", e.g. * * $href = ( $item == $root || !$item->numChildren || $item->has_own_page ? "$item->url" : "#" ); * * Intended to be used without arguments, i.e. "selectiveMenu();" , i.e. always starting with site root. */ function selectiveMenu(Page $root = null) { $shownPage = wire('page'); if(is_null($root)) $root = wire('pages')->get('/'); $level = count($root->parents); $ul_class_string = (($level > 0) ? "class='submenu'" : ""); $out = "\n<ul {$ul_class_string}>"; $parents = $shownPage->parents; $items = $root->children; if ($level == 0) $items->prepend($root); foreach( $items as $item) { if ($item->in_main_menu) { $s = ''; $li_class_string = ( ( $parents->has($item) && $item !== $root ) || $item === $shownPage ? "class='current'" : "" ); if($item->numChildren && $item !== $root) { $s = str_replace("\n", "\n\t\t", selectiveMenu($item)); } $href = ( $item == $root || !$item->numChildren ? "$item->url" : "#" ); $out .= "\n\t<li {$li_class_string}>\n\t\t<a href='{$href}'>{$item->title}</a>$s\n\t</li>"; } } $out .= "\n</ul>"; return $out; }
  13. I am using @Damienov's tweaked bootstrap menu for a project, but ran into a snag. I have a few pages that I dont want to display in the header navigation (but will be used in the footer, another hurtle). Does anyone have any advice on how to achieve this?
  14. Well, after I thought I was near completion, a fun issue reared its ugly head. I have my tree set up like (names are just examples): Home Articles - User 1 -- Article 1 -- Article 2 -- Article 3 -- Article 4 - User 2 -- Article 1 -- Article 2 -- Article 3 -- Article 4 I have a drop down in my navigation called "User 1" (for when you are under User 1) that uses: <?php foreach($page->siblings as $child) { echo "<li><a href='{$child->url}'>{$child->title}</a></li>"; } ?> This works great as long as you Stay in user 1. However if you go to the "User 2" dropdown, everything is replaced by user 2 and user 1 no longer displays. I realize it is because I am selecting the siblings, but is there a way to go about haveing both dropdowns contained and populated no matter which article I am currently viewing?
  15. Hi guys, I got a problem that drives me crazy. I just want to have the root of my page shown in the top navigation, together with its children. I've been searching for days by now, please help me. in the navigation.inc file it says Credits: * I have used some same navigation methods used by Ryan Cramer. * So full credit to Ryan Cramer */ so I compared Ryan Cramers navigation with the one used in the Blue VR Site. Cause in Ryans Foundation Site navigation the root (or Home) is already part of the navigation. It didn't help me much, I still can't figure out what to change. https://github.com/ryancramerdesign/FoundationSiteProfile/blob/master/site-foundation/templates/_nav.php https://github.com/gayanvirajith/BlueVrSiteProfile/blob/master/templates/_navigation.inc I tried a lot of different things, that either didn't show any effect, or broke the complete site. If you have a suggestion what could work, I'm gratefull for any hint! Thanks in advance!
  16. Hello I'm totaly new to PW and for now I find it very understanding, all but navigations. I tried to find some videos or tutorials explaining about this but noting helpfull comes up. I read i most of the tutorials on the forum that I could find but stil cant find the right answer. I'm making my first template and need your help on how do I create a menu like this in WP. I'm not a coder ... but understand a little. <ul class="nav navbar-nav"> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Home <i class="fa fa-angle-down"></i></a> <ul class="dropdown-menu"> <li><a href="index-1.html">Masonry</a></li> <li><a href="index-3.html">Masonry v1</a></li> </ul> </li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">Pages <i class="fa fa-angle-down"></i></a> <ul class="dropdown-menu"> <li><a href="about-us.html">About Us</a></li> <li><a href="services.html">Services</a></li> </ul> </li> </ul> right now I'm here but it's not working right. <ul class="nav navbar-nav"> <?php $root = $pages->get("/"); function visit(Page $parent, $enter, $exit=null) { foreach ($parent->children() as $child) { call_user_func($enter, $child); if ($child->numChildren > 0) { visit($child, $enter, $exit); } if ($exit) { call_user_func($exit, $child); } } } visit( $pages->get(1) , function(Page $page) { echo '<li class="dropdown"><a href="' . $page->url . '" class="dropdown-toggle" data-toggle="dropdown">' . $page->title; if ($page->numChildren > 0) { echo '<ul class="dropdown-menu"> <li><a href="$page->url"></li> '; } else { echo '</a>'; } } , function(Page $page) { echo '</li>'; if ($page->numChildren > 0) { echo '</ul>'; } } ); ?> And I want my HOME page also to be shown. Any ideas? Thank you in advance R.
  17. I have been scratching my head on this one for an hour. How do you get the parent (of the current child page) and list all the children for a navigation.?
  18. How could i accomplish this? I would like to have in the admin a second page navigation and I would like to able to move some elements from the default page navigation to the other one. The element and their children. Any ideas on this?
  19. I've started a processwire project from a blank project. for some reason when I open my browser the page opened is not the "home.php" page, but the "basic-page.php" template. I've checked and my home page is set to use the 'home' template and not the 'basic-page' template. How do I change that?
  20. I got to work on an already existing processwire project. I downloaded the whole site folders (site + wire) and exported the database to my mac. I'm using the php server to serve me the pages (with the command $php -S 127.0.0.1:8080) and indeed when I go to localhost:8080 I see the homp.php page. The problem is that no matter what url I put after "localhost:8080" I keep getting routed to home.php page. If I click on a link to an outer site, I get there, but I can't get to any other pages in my site. Any ideas? I'm Working on a mac with OSX. (Also - this is my first web-developing project, so if you can be specific about any instructions regarding local servers I will appreciate it).
  21. Hi, I'm wondering if anyone could give me a bit of help, i'm a php newbie, so you mkight need to be patient! I'm trying to build a navigation menu that's contextual depending on where you are in the site, let me try to explain. the site tree would be something like this Root - section -sub-section -article -article -article -sub-section -article -article -article -sub-section - section - section - section I need to find a way to get the -section level you are in which always has a different template from the rest (if that makes a difference) I hope this makes some kind of sense. I've been tying myself in knots trying to come up with different solutions! Many thanks in advance for any help you can give me
  22. hi @all could somebody help me and show me the right way to create easily topbar-navigation PW+ZurbFoundation please? This is my HTML for the navigation: <nav class="top-bar" data-topbar> <ul class="title-area"> <li class="name"> <h1> <a href="#"> 1. BGC-Celle </a> </h1> </li> <li class="toggle-topbar menu-icon"><a href="#"><span>menu</span></a></li> </ul> <section class="top-bar-section"> <ul class="right"> <li class="divider"></li> <li class="has-dropdown"> <a href="#">Main Item 1</a> <ul class="dropdown"> <li><label>Section Name</label></li> <li class="has-dropdown"> <a href="#" class="">Has Dropdown, Level 1</a> <ul class="dropdown"> <li><a href="#">Dropdown Options</a></li> <li><a href="#">Dropdown Options</a></li> <li><a href="#">Level 2</a></li> <li><a href="#">Subdropdown Option</a></li> <li><a href="#">Subdropdown Option</a></li> <li><a href="#">Subdropdown Option</a></li> </ul> </li> <li><a href="#">Dropdown Option</a></li> <li><a href="#">Dropdown Option</a></li> <li class="divider"></li> <li><label>Section Name</label></li> <li><a href="#">Dropdown Option</a></li> <li><a href="#">Dropdown Option</a></li> <li><a href="#">Dropdown Option</a></li> <li class="divider"></li> <li><a href="#">See all →</a></li> </ul> </li> <li class="divider"></li> <li><a href="#">Main Item 2</a></li> <li class="divider"></li> <li class="has-dropdown"> <a href="#">Main Item 3</a> <ul class="dropdown"> <li><a href="#">Dropdown Option</a></li> <li><a href="#">Dropdown Option</a></li> <li><a href="#">Dropdown Option</a></li> <li class="divider"></li> <li><a href="#">See all →</a></li> </ul> </li> </ul> </section> </nav> how can I render this in PW easily? Thanks
  23. Is there a way to display the category list from Opencart in Processwire? Opencart is a good e-commerce solution and PW is a great CMS. However we need the best of both and want the navigation to pull dynamically from each. Displaying the PW nav tree in Opencart should be possible using the PW API but how about the other way round? Displaying the Categories from Opencart in the PW front end?
  24. Hi, first of all thanks for this amazing CMS. I'm currently building my first page with PW, and I really like the concept. I have long years of experience with TYPO3, Wordpress, Joomla and some other more exotic systems, and I think PW just rocks, but I have difficulties to find the right/smart way for my ideas, due to lack of experience and know-how in the PW world. I guess what I'm trying to say -- be patient if waht I'm asking has been dealt with before or is a no-brainer for you guys with more PW-experience. I have a page "events" that I want to show in the navigation(s), since it features some editor-content. Sub pages of this will be "event" pages, and they shouldn't be showing in the main-navigation(s), since they will be linked via teaser boxes and such. Maybe later on, there will be the need to browse these events via their own navigation, but not right now. I understand that I can control the visibility of the "event" page via the page option. Now, it would be possible, but not comfortable, to ask the editor to make sure that "event" pages are published, but not visible. From my experience, this sooner or later will be trouble, because, well, people, you know… ;-) Is it possible to have a "default" status of published pages set (via the parent template)? -- I didn't find that kind of setting in the admin. Another way would be to control the navigation via the template, by simply not showing child pages when on the page "events". Now this is not so smart in my setup, because I opted to use the "MarkupSimpleNavigation.module" to build the main navigation and the navigation that'll show up on the page/content, if child pages are present. I found no way to tell the module to ignore (visible) child pages if in context of a certain page (other than to change the max level or depth setting). Currently I'm using a nav_main.inc.php and nav_sub.inc.php include throughout my frontend templates; I think it would be possible to switch the navigation module's behavior by chekcing for the page that includes them - but I don't want to clutter my code with if/else or switch conditions, if it can be avoided somehow So I think it boils down to: Either a way to set the visibility for new pages under "events" to hidden by default - which would work without the need to touch the navigation module, but may be not future-proof or a way to tell the navigation module if included in the "events" template to ignore the child pages, which can be done in several ways. A third way could be to separate the "events" content page from the "events" container page, but that's kind of, uhm, ugly I think the second way is the way to go, but out of curiosity, how would you take on the first one? Thanks for reading all this, Tom
  25. Hi all I have successfully built my very first navigation menu. It works by looping through the pages within a section and echoing the page title and url. The problem is, sometimes I will need a navigation link to take me to a page within a different section to the current one, and I have no idea how I could achieve this. Has anyone ever had to do this themselves, or have an idea how it could be achieved?
×
×
  • Create New...