![](http://processwire-forums.s3.us-west-2.amazonaws.com/set_resources_6/84c1e40ea0e759e3f1505eb1788ddf3c_pattern.png)
Kass
-
Posts
7 -
Joined
-
Last visited
Posts posted by Kass
-
-
Hello all!
I think this may require writing a function, which I'm not too good at...
I have a primary navigation and secondary navigation, each with multiple nav-items.
When a user visits a child or grand-child of a nav-item on the primary navigation, the parent nav-item retains its "active" class - no problem.
The issue: When a user visits the child or grand-child of a nav-item on the secondary navigation, the nav-item on the secondary navigation not retain its "active" class. It only has an active-class when the user is on the landing page of the nav-item.
Bootstrap automatically gives the "dropdown sublevel-menu" (secondary nav) an active class when the user is on the landing page of the nav-item, but if the user visits children of the nav-item, the active-class disappears. The primary nav-items retain the "dropdown active" even when their children are active.
I'd appreciate any help with this head-banger!
Thanks
-
Hello all,
I use PW for my blog and a different installation on a subdirectory for e-commerce.
I want the search form on my PW blog to be able to include search results of the subdirectory shop, and the search form on my subdirectory site to be able to include search results of the blog. I am thinking about displaying search results under different tab headings so that customers can filter them - e.g. Shop; Blog Posts; Services.
Originally, I was going to implement Google Custom Search to do this, as it can search multiple websites and is quite common. But because it is ending its paid solution this year, I am looking for an alternative. Am I right in thinking that Elasticsearch would be the best solution?
Can somebody advise on the difficulty of implementing a search engine like Elasticsearch, or something similar, with Processwire?
Sorry if this seems like an elementary question - I have never implemented a search engine, but one must start somewhere in learning how to do so! Thanks, Kass
-
Solved.
I checked using your php above, and it turned out that the issue was with my browser cache and not the code.
Thanks @flydev !
-
2
-
-
Hello @flydev. Thank you very much indeed!
Your solution worked perfectly when I loaded it on Firefox, but there is an issue with Chrome:
On Chrome inspect, the responsive menu appears under the div class 'mean-bar', instead of in the 'meanmenu-container' like on Firefox, and consequently the languages are displayed below the nav instead of above
Kass
-
1
-
-
Hello Rick,
Thank you for your response. Yes, here it is below
<!--Mobile Menu--> <header id="mobile-menu" class="hidden-sm-up"> <nav id="mobile-menu" class="hidden-sm-up"> <a class='navbar-brand navbar-brand-mobile hidden-md-up' href='<?php echo $homepage->url; ?>'>Pwbs4</a> <?php $pa = $homepage->children; $pa = $pa->prepend($homepage); echo renderMobileNavbar($pa); ?> </nav> </header> <!--/#mobile-menu-->
Here is the script line:
<script src="<?php echo $config->urls->templates; ?>assets/js/jquery.meanmenu.min.js">
I have not altered the meanmenu.css file . Here is the beginning of the css file:
a.meanmenu-reveal { display: none; } /* when under viewport size, .mean-container is added to body */ .mean-container .mean-bar { float: left; width: 100%; position: relative; background: #0c1923; padding: 4px 0; min-height: 42px; z-index: 999999; } .mean-container a.meanmenu-reveal { width: 22px; height: 22px; padding: 13px 13px 11px 13px; position: absolute; top: 0; right: 0; cursor: pointer; color: #fff; text-decoration: none; font-size: 16px; text-indent: -9999em; line-height: 22px; font-size: 1px; display: block; font-family: Arial, Helvetica, sans-serif; font-weight: 700; } .mean-container a.meanmenu-reveal span { display: block; background: #fff; height: 3px; margin-top: 3px; } .mean-container .mean-nav { float: left; width: 100%; background: #0c1923; margin-top: 44px; } .mean-container .mean-nav ul { padding: 0; margin: 0; width: 100%; list-style-type: none; }
-
Hello,
I've been learning to code (to use PW) for about a month. I am using PW + Bootstrap 4, with Mean-Menu, as per the compiled version below:
I wanted to display the website's languages in its own fluid container above the navigation. It worked on desktop view, as I simply put the code above the main navigation code in the body of _main.php.
The problem: when the website goes responsive, and when the Mean-Menu appears, the fluid container for the languages appears below the Mean-Menu navigation instead of above it.
Here is my code for the languages container:
<div class="container-fluid"> <div class="row"> <div class="col-xs-12 col-lang"> <!-- language navigation --> <ul class='languages'><?php foreach($languages as $language) { if(!$page->viewable($language)) continue; // is page viewable in this language? if($language->id == $user->language->id) { echo "<li class='current'>"; } else { echo "<li>"; } $url = $page->localUrl($language); $hreflang = $homepage->getLanguageValue($language, 'name'); echo "<a hreflang='$hreflang' href='$url'>$language->title</a></li>"; } ?></ul> <!-- language navigation --> </div> </div> </div>
I'd be highly grateful if someone could offer a solution.
Kass
Prestashop add-to-cart button (ecommerce with processwire)
in General Support
Posted
Hi everyone,
Does anyone know how I could insert an add-to-cart button (of a product from Prestashop) onto a Processwire page? The add-to-cart button should then lead the user to the checkout page of a Prestashop installation. The user should be able to select the product quantity before adding-to-cart.
I am aware of simplecart.js but I do not want to use it because of its security flaws which I've read about. I'm also aware of Padloper but it doesn't really suit my needs.
I saw a thread about this topic posted in 2014 but it is a bit older now and provides no conclusive answer :
Thanks for any help
Kass