Jump to content

milo695

Members
  • Content Count

    9
  • Joined

  • Last visited

Community Reputation

0 Neutral

About milo695

  • Rank
    Newbie

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hi, I did try, but got this errors: Warning: count() expects at least 1 parameter, 0 given in \site\templates\partials\_menu.php on line 37 and Notice: Object of class ProcessWire\PageArray could not be converted to number in \site\templates\partials\_menu.php on line 37 Here's the code of my _menu.php: <?php namespace ProcessWire; ?> <nav id="menu-main" class="navbar navbar-light navbar-expand-lg fixed-top" role="navigation"> <div class="container-fluid"> <div class="d-none d-lg-block"> <a class="logo-centered animated fadeInDown" title="<?php echo $homepage->title; ?>" href="<?php echo $homepage->url?>"> <img itemprop="logo" class="hvr-grow" src="<?php echo $theme_page->big_logo->size(400, 120, ['upscaling' => false, 'cropping' => false])->url; ?>" alt="<?php echo $theme_page->big_logo->title ?>"> </a> </div> <a class="navbar-brand animated" title="<?php echo $homepage->title; ?>" href="<?php echo $homepage->url?>"> <img src="<?php echo $theme_page->small_logo->size(130, 32, ['upscaling' => false, 'cropping' => false])->url; ?>" alt="<?php echo $theme_page->small_logo->title ?>"> </a> <div class="dropdown ml-auto" id="languageCollapse"> <button class="navbar-toggler mr-2 border-0 collapsed" type="button" data-toggle="dropdown" data-target="#languageCollapse" aria-controls="languageCollapse" aria-expanded="false" aria-label="Toggle language"> <span class="lang-sm-disabled dropdown-toggle" lang="<?php echo $language_code; ?>"><?php echo strtoupper($language_code); ?></span><span class="caret"></span> </button> <div class="d-lg-none dropdown-menu dropdown-menu-right mt-2"> <?php include 'partials/_languages-dropdown.php' ?> </div> </div> <button class="navbar-toggler border-0 collapsed" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="icon-bar top-bar"></span> <span class="icon-bar middle-bar"></span> <span class="icon-bar bottom-bar"></span> <span class="sr-only">Toggle navigation</span> </button> <div class="collapse navbar-collapse" id="navbarCollapse"> <ul class="navbar-nav ml-auto"> <?php foreach ($homepage->children as $item): ?> <li class="nav-item"> <a class="nav-link" href="<?php echo $item->url; ?>"<?php if ($item->id == $page->rootParent->id): ?> class="active"<?php endif; ?> title="<?php echo $item->title; ?>"> <?php echo $item->title; ?> </a> <?php if($item->children-count()): // if there is a child page, loop through all the child page ?> <ul> <?php foreach($item->children as $subitems): //loop through all the sub-page of the current $item ?> <li class="nav-item"> <a class="nav-link" href="<?php echo $item->url; ?>"<?php if ($item->id == $page->rootParent->id): ?> class="active"<?php endif; ?> title="<?php echo $item->title; ?>"> <?php echo $item->title; ?> </a> </li> <?php endforeach; ?> </ul> <?php endif; ?> </li> <?php endforeach; ?> </ul> <ul class="d-none d-lg-flex navbar-nav ml-auto"> <li class="nav-item dropdown ml-auto"> <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"> <span class="lang-sm-disabled" lang="<?php echo $language_code; ?>"><?php echo strtoupper($language_code); ?></span><span class="caret"></span> </a> <div class="dropdown-menu dropdown-menu-right"> <?php include 'partials/_languages-dropdown.php' ?> </div> </li> </ul> </div> </div> </nav> I messed something up...
  2. Hi all, I'm using this: https://demo.seavuel.com/ admin login: https://demo.seavuel.com/processwire/ admin 123456789 Installed ProcessMenuBuilder to finaly be able to group and handle menu items and create sub-menu entries, but I can't get it to work. It's there in the backend, but nothing changes in the frontend. I need help with /partials/_menu.php code to get ProcessMenuBuilder to work. This is the /partials/_menu.php: <?php namespace ProcessWire; ?> <nav id="menu-main" class="navbar navbar-light navbar-expand-lg fixed-top" role="navigation"> <div class="container"> <div class="d-none d-lg-block"> <a class="logo-centered animated fadeInDown" title="<?php echo $homepage->title; ?>" href="<?php echo $homepage->url?>"> <img itemprop="logo" class="hvr-grow" src="<?php echo $theme_page->big_logo->size(400, 120, ['upscaling' => false, 'cropping' => false])->url; ?>" alt="<?php echo $theme_page->big_logo->title ?>"> </a> </div> <a class="navbar-brand animated" title="<?php echo $homepage->title; ?>" href="<?php echo $homepage->url?>"> <img src="<?php echo $theme_page->small_logo->size(130, 32, ['upscaling' => false, 'cropping' => false])->url; ?>" alt="<?php echo $theme_page->small_logo->title ?>"> </a> <div class="dropdown ml-auto" id="languageCollapse"> <button class="navbar-toggler mr-2 border-0 collapsed" type="button" data-toggle="dropdown" data-target="#languageCollapse" aria-controls="languageCollapse" aria-expanded="false" aria-label="Toggle language"> <span class="lang-sm-disabled dropdown-toggle" lang="<?php echo $language_code; ?>"><?php echo strtoupper($language_code); ?></span><span class="caret"></span> </button> <div class="d-lg-none dropdown-menu dropdown-menu-right mt-2"> <?php include 'partials/_languages-dropdown.php' ?> </div> </div> <button class="navbar-toggler border-0 collapsed" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation"> <span class="icon-bar top-bar"></span> <span class="icon-bar middle-bar"></span> <span class="icon-bar bottom-bar"></span> <span class="sr-only">Toggle navigation</span> </button> <div class="collapse navbar-collapse" id="navbarCollapse"> <ul class="navbar-nav mr-auto"> <?php foreach ($homepage->children as $item): ?> <li class="nav-item"> <a class="nav-link" href="<?php echo $item->url; ?>"<?php if ($item->id == $page->rootParent->id): ?> class="active"<?php endif; ?> title="<?php echo $item->title; ?>"> <?php echo $item->title; ?> </a> </li> <?php endforeach; ?> </ul> <ul class="d-none d-lg-flex navbar-nav ml-auto"> <li class="nav-item dropdown ml-auto"> <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"> <span class="lang-sm-disabled" lang="<?php echo $language_code; ?>"><?php echo strtoupper($language_code); ?></span><span class="caret"></span> </a> <div class="dropdown-menu dropdown-menu-right"> <?php include 'partials/_languages-dropdown.php' ?> </div> </li> </ul> </div> </div> </nav> thank you for any help you can provide.
  3. Thank you for this, I really appreciate it. Will do as you suggested.
  4. Hi guys, Is there a good soul to help a noob like me integrate ProcessMenuBuilder into my website. I've installed it, it's working but not showing a thing in frontend. I know I'm suppose to add it to frontend template, but I don't know how...
  5. Thank you again, It was my bad - it was pulling old cache, it's all working now!
  6. Hey, it's something like this in a multilingual website: I insert standard link via CKeditor to a internal page: <a href="/booking/">Book Now</a> Now, I need that link to go to translated page depending of user language preference. If user changed language to italian from the menu, then the link will go to: /it/booking/ if german than /de/booking/ etc... I'm trying to make a COVID-19 announcement on my main page, but not via main menu template file but from editor. But if that is not possible I can place the link somewhere in the template file in order to work, but I need code example in order to do that. Thanks BitPoet
  7. Hello, I've added a class in ProcessPageEditLink but when I call it from Editor (attributes > class) nothing happens. Also, I've created the class in my custom.css, is there any other css file this class needs to be in? thanks
  8. Hi all, I need help creating link in CK editor that would target my translated page, so it depends on what language user has selected. something like: <a href="?id=1450">view all</a> would target: <a href="en/onion/">Onion</a> <a href="de/zwiebel"></a> depending on user defined language. Thank you
  9. Hi all, new here so please bear with me . I have few questions regarding config.php file when cloning/duplicating websites (copy files to other dir/domain, export database > make new db, import old db, configure config.php): 1. $config->userAuthSalt = 'somethinginhere'; Can this remain the same as on previous website or I need to change this string? 2. $config->httpHosts = array('mydomain.com'); What is the proper way - with or without http/https? 3. Can I manually delete: site/assets/files/bunch-of-folders-here that are from old website or there is a better way to do this? This post is actually about the proper way of handling new website when being copied from existing.. Thanks
×
×
  • Create New...