How to add select menu in prestashop? - menu

I have theme, and in header.tpl
<div class="nav">
<div class="container">
<div class="row">
<nav>{hook h="displayNav"}</nav>
</div>
</div>
</div>
But this is normal <ul>, <li> menu... How to make it responsive - f.e. select menu?

In Prestashop the horizontal top menu is generated by this module "blocktopmenu" in the modules folder you can find blocktopmenu.php and you can edit how the module generate the menu html

Related

CMSParagraphComponent does not render HTML tag attributes after 2105 Upgrade

After upgrading to SAP Commerce 2105 Patch 13 from 1811, components with type CMSParagraphComponent do not have img, span HTML tags and HTML tag attributes like class, style.
Before upgrade HTML was displaying in the page as following:
<div class="content">
<div class="size-guide__area active" data-js="size-guide-area">
<div>
<div class="size-guide__close" data-js="size-guide-close">
My text
<span class="icon-close-circle"></span>
</div>
</div>
</div>
</div>
My component is covered with <true class="yCmsComponent"></true> after upgrade somehow.
After upgrade HTML is displaying as following:
<true class="yCmsComponent">
<div class="content">
<div>
<div>
<div>
My Text
</div>
</div>
</div>
</div>
</true>
impex:
INSERT_UPDATE CMSParagraphComponent;$contentCV[unique=true];uid[unique=true];name;&componentRef;content[lang=$lang];
;;chartParagraph;Chart Paragraph;chartParagraph;"<div class='size-guide__area' data-js='size-guide-area'>
<div>
<div class='size-guide__close' data-js='size-guide-close'>
My text
<span class='icon-close-circle'></span>
</div>
usage in tag file:
<cms:component uid="chartParagraph" evaluateRestriction="false"/>
CMSParagraphComponentRenderer class is sanitizing HTML. Rules are defined in HtmlSanitizerPolicyProvider class. It is checking a property before sanitizing. I solved issue by changing the property in storefront extension. You may customize HtmlSanitizerPolicyProvider class to have a safer solution. Changing following property may cause an issue, it is not the safest solution.
In the project.properties file of the storefront extension, add following property.
cms.components.allowUnsafeJavaScript=true

Buildfire: How to remove the "saved" part?

I could use some hints to get rid of the SAVED content in the coupon Plugin -
Screenshot of the area i want to remove
Thanks in advance!
O.
In the file widget/templates/List-Layout-1.html file you will see the following code:
<div class="col-xs-6 pull-left text-center primaryBackgroundTheme">
<a class="whiteTheme stretch" ng-
click="WidgetHome.showSavedItems()">Saved</a>
</div>
You can just update it to the following:
<div class="col-xs-6 pull-left text-center primaryBackgroundTheme">
</div>
The widget has 4 layouts, so depending on the layout that you want to use, you need to make sure to update the appropriate template.

Is there any way to control/route content by referrer value in Expression Engine?

Let’s say that I have a carousel on my index page.
Inside the template for index, it loads a particular channel, “Foo”
<div "slider">
<ul class="slides">
{exp:low_reorder:entries set="foo" dynamic="no"}
<li class="foo_{entry_id}">
<div class="container">
<div class="row-fluid">
<div class="span12">
{foo_html}
<style type="text/css">{foo_css}</style>
</div>
</div>
</div>
</li>
{/exp:low_reorder:entries}
</ul>
</div>
That channel, naturally, has a list of content items
I want the list of content items displayed to exclude one of the items in the channel if the referrer is not bing.
Can anyone show me the way that they would go about accomplishing that? I'm not getting any traction on the ellislab forum.
I whipped up a plugin for you, which you can find here
You can wrap the item in a conditional using that plugin to check if it should be output.

Bootstrap modals don't work with dropdown menu in Liferay

this question relates to my previous question. I use Bootstrap 2.3.2 and Liferay 6.2 bundled with Tomcat. I would like to use modal windows created in Bootstrap 2.3.2. Thanks to answer in previous question I am able to show Bootstrap modals in Liferay. The problem is when I use dropdown menu with buttons, which open modal windows.
Button group
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
Add
<span class="caret"></span>
</button>
<ul class="dropdown-menu">
<li><a href="" id="addVertexModalA" onclick="$('#addVertexModal').modal();" > Vertex1 </a></li>
<li> Vertex2 </li>
</ul>
<button onclick="$('#addVertexModal').modal();">Show</button>
</div>
When I click on Vertex1 or Vertex2 button in dropdown-menu, the modal window disappears immediately after showing. If I click on Show button, it is okay.
Modal window
<div id="addVertexModal" class="modal fade" style="display: none;">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="addVertexModalHeader"> Add Vertex </h3>
</div>
<div class="modal-body">
<form class="form-horizontal">
<div class="control-group">
<label class="control-label"> names </label>
<div class="controls">
<textarea rows="3"></textarea>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true"> Cancel </button>
Confirm
</div>
</div>
<script>
$(document).on("click","#addVertexModalB",function() {
$("#addVertexModal").modal("show");
});
</script>
I use only these resources in portal.
<header-portlet-javascript>/scripts/jquery-1.9.1.js</header-portlet-javascript>
<header-portlet-javascript>/scripts/bootstrap_2.3.2.js</header-portlet-javascript>
I would like to provide jsfiddle or something similar, but it doesn't work in Liferay system (I guess because of AlloyUI css or script files). I tried to remove dropdown-menu class and "dropdown-toggle" class with data-toggle="dropdown", but it didn't help (modal still disappears immediately after showing).
Remove href="" from your <a> tags. When you click on the list item with <a href="" ... />, it causes a GET on the page which reloads the whole page (thus causing your onclick to never execute and show the modal).

What to use to create a custom grid layout on Zurb Foundation

I'm new to JS and I'm trying to find a solution to creating a responsive custom grid layout on the Zurb Foundation 4 framework.
Custom Layout
There will be a set size for bigger blocks and the smaller ones will fill in around it but in this type of pattern as more divs are added.
But in a mobile layout, they will all become the same size and stack.
I've been messing around with mason.js and jQuery masonry but I haven't had any luck. Would either of these work for my problem or is there something else I should look into?
You can do a layout like that with just nested rows and using other grid classes like "small-", "large-", push, pull etc
I know you mentioned a JavaScript solution, but I thought I would offer up a crude Html/CSS option.
<div class="row">
<div class="large-2 columns">
<div class="row">
<div class="large-12 columns"></div>
</div>
<div class="row">
<div class="large-12 columns"></div>
</div>
</div>
<div class="large-5 columns"></div>
<div class="large-5 columns"></div>
</div>
<div class="row">
<div class="large-4 columns"></div>
<div class="large-8 columns">
<div class="row">
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
</div>
<div class="row">
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
<div class="large-4 columns"></div>
</div>
</div>
</div>
Here is an extremely rough jsFiddle example
Obviously some playing around with the column count and possibly customize margins would be in-order. I did remove the media queries since the result window was playing tricks on me.
Hope this helps either way.
I wrote a plugin that does just this. check out www.masonjs.com that should do exactly what you're looking for! Cheers!

Resources