Jump to content

Roych

Members
  • Posts

    383
  • Joined

  • Last visited

Everything posted by Roych

  1. Nice, thank you, works perfect R
  2. Hello, I'm new to PW and need some help. I created a simple gallery which is working fine, but I can't figure it out how to create some styling for pagination. I use this for pagination: <?= $a->renderPager() ?> My html look like this: <div class="numeric-pagination"> <a href="#" class="button"><i class="icons icon-left-dir"></i></a> <a href="#" class="button">1</a> <a href="#" class="button active-button">2</a> <a href="#" class="button">3</a> <a href="#" class="button"><i class="icons icon-right-dir"></i></a> </div> I hope you understand what I want to create. Thank you R
  3. Hello thank you I'm glad I'm here This cms can actualy give me what I need Thank you #Gebeer I tried what you've said and I just had to put in the code from https://processwire.com/talk/topic/5680-bootstrap-3-navigation-with-multiple-leveltier-fix/ without function.php and it's working great so far. I tried with your code above but didn't work at all, the site got internal error. Or did I do something wrong? Did axactly what you've said.. Thank you very much R
  4. 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.
×
×
  • Create New...