Magnolia breadcrumb - magnolia

I am new to Magnolia and am trying to configure the breadcrumb for a site. I took a look at the documentation, but it is very limited.
<div id="breadcrumb">
<h5>${i18n['nav.selected']}</h5>
<ol>
[#list model.breadcrumb as item]
[#if item_has_next]
<li>${item.navigationTitle}</li>
[#else]
<li><strong>${item.navigationTitle}</strong></li>
[/#if]
[/#list]
</ol>
</div>
I found the script above which renders the breadcrumb, but struggle with the configuration. Can you give me an example (with picture) if possible?
Thank you
very much

I'm not sure you need to configure the breadcrumb for your site.
If you use the STK (Standard Templating Kit) pages templates, like stkArticle, stkSection, etc, then you get the bread crumb trail for free.
What I've done is to extend STK templates then override the areas/main/templateScript value to point at my own freemarker script. The script then looks like this:
<div id="main" role="main">
[#cms.area name="breadcrumb" content=content/]
[#cms.area name="intro" content=content/]
[#cms.area name="opener"/]
[#cms.area name="content"/]
<!-- ADD YOUR SPECIFIC CONTENT HERE -->
</div>
Hope this helps.

Related

Creating Drop-Down Menu For Custom Wordpress Theme

I'm trying to build a Wordpress theme from scratch. The drop down menu isn't appearing, although I added the list pages tag. Here is the code I'm using for the wp_nav_menu function.
<?php wp_head(); ?>
</head>
<body>
<div class="nav">
<div class="container">
<ul class="pull-left">
<li class="cursive">Mu Alpha Theta</li>
</ul>
<?php wp_nav_menu( array('menu' => 'Menu' )); ?>
</div>
</div>
The pages appear on the site's menu; however, they aren't merging into a drop-down. I'm wondering if it has something to do with the CSS. As in, do I have to create a structure for how it would look? Or, I'm thinking that I'm misusing th wordpress function.
Thank you for reading my questions. I would love to hear any advice.
If it's placing, but not as you want (in a drop down) it would seem to be a css issue. There are many arguments you can parse to the function outlined here in the codex. From there it's just using the id's/classes and css to get the display you're looking for.
Also, from that codex page:
Note: As of 3.5, if there are no menu items, no HTML markup will be
output.
So ensure there is some items in your menu as well, even for testing.
Depending on how fancy you want to be, you may need a custom Walker. Caveat emptor: they are not for the faint of heart.

Woocommerce Shop Page Product Display Bug

When I go to my shop page products are displayed in a very strange way : Product details take lot of place. I tried to understand what have changed since yesterday and I notice (inspecting element via Chrome) that the html code before was :
<ul id=product ....>
<li class=product_item ...>
<div class=image container>...</div>
<div class=clearfix>...</div>
<div class=product details>...</div>
</il>
</ul>
and now I have this following code (and it destroy my product list display) :
<ul id=product ....>
<div class=t_singleproduct_cont>
<li class=product_item ...>
<div class=image container>...</div>
</il>
</div>
<div class=clearfix>...</div>
<div class=product details>...</div>
</ul>
As you can see the product details is outside the li tag and so my shop page is such a mess.
I tried to identify where this piece of code was coming from and I found that it was inside the content-product.php file but I can't see the line with "t_singleproduct_cont" div.
If you could help to deal with this problem I'll be very grateful !
Thank you very much
#Tayfun Akaltun. Have you installed plugin called enhanced e-commerce plugin for google analytics?

Name of the Navigation Portlet on Plone.org?

What is the name of the collapsing Navigation Portlet on Plone.org (Get Plone - Learn Plone - Get Involved)? I can't find it in the Portlets Download Section.
It is not a portlet, but part of the custom Plone.org frontpage view that uses the jQueryUI Accordion widget.
See the Plone.org frontpage source.
<div id="accordion">
<h2 class="current">Get Plone</h2>
<div class="pane" style="display:block">
<a id="download-link" href="/download">DOWNLOAD NOW<br />
Plone
<span tal:content="python: here.products.getFeaturedProjectRelease().getId()">3.2.0</span>
·
<span tal:content="python: here.products.getFeaturedProjectRelease().effective_date.strftime('%h ' + u'\u2019' + '%y')">Feb 2009</span></a>
<dl>
<dt>What’s new in Plone 4</dt>
<dd>An overview of the new features.</dd>
<dt>Roadmap</dt>
<dd>Our plans for the future.</dd>
<dt>Older releases</dt>
<dd>Looking for a previous version?</dd>
<dt>Add-on Products</dt>
<dd>Adapt Plone to your needs.</dd>
<dt>Security Advisories</dt>
</dl>
</div>
<h2>Learn Plone</h2>
<div class="pane">
<dl>
<dt>Documentation</dt>
<dd>Plone has a great collection of online documentation.</dd>
<dt>Buy Books</dt>
<dd>For those of you who think better in bed with a book.</dd>
<dt>Forums & Chat Rooms</dt>
<dd>People are always ready to help you with your Plone questions.</dd>
<dt>Find Plone Training</dt>
<dd>Let one of the Plone experts guide you through getting productive.</dd>
<dt>Commercial Support</dt>
<dd>Over 300 companies around the world offer Plone services.</dd>
</dl>
</div>
<h2>Get Involved</h2>
<div class="pane">
<dl>
<dt>Suggest New Features</dt>
<dd>Have an awesome idea about a new feature for Plone?</dd>
<dt>Report Bugs</dt>
<dd>Plone has no bugs. If you found one anyway, report it here.</dd>
<dt>Write Code</dt>
<dd>If you’re proficient in Python, HTML, CSS or JS, join us!</dd>
<dt>Translate, Write Docs, Help Test</dt>
<dd>There are lots of things you can do to make Plone better.</dd>
<dt>Read Blogs, Publish Yours</dt>
<dd>Stay up to date on Plone</dd>
<dt>Support the Plone Foundation</dt>
<dd>If all else fails, give cold, hard cash.</dd>
</dl>
</div>
</div> <!-- End accordion -->

drupal 7: custom design theme a block created with the Views module

i create block with views module for Print Promoted to front page, this worked and i see result in my front page. this views worked with field and i print title, thumbs, content. now i need to custom this theme views for show in jquery content slider.
i click in advanced->theme->information i see this:
field content revision: views-view-field.tpl.php, views-view-field--title.tpl.php, views-view-field--frontpage.tpl.php, views-view-field--frontpage--title.tpl.php, views-view-field--block.tpl.php, views-view-field--block--title.tpl.php, views-view-field--frontpage--block.tpl.php, views-view-field--frontpage--block--title.tpl.php, views-view-field--block-1.tpl.php, views-view-field--block-1--title.tpl.php, views-view-field--frontpage--block-1.tpl.php, views-view-field--frontpage--block-1--title.tpl.php
But i don't find any .tpl.php theme files for edit theme design using html and css. how to create custom design theme for print my result with this format:
<div id="content">
<ul>
<li>
<div class="title">title1</div>
<div class="thumbs"><img 1 ......></div>
<div class="content">content1</div>
</li>
<li>
<div class="title">title2</div>
<div class="thumbs"><img 2 ......></div>
<div class="content">content2</div>
</li>
</ul>
</div>
I think the Views 2 theming guide has already explained everything clearly. Just follow the steps there and it only takes just minutes.

How do I render an Archetypes in a template?

I would like to render a list of Plone Archetypes in custom template.
In my example, I'm searching 'PortletPage' type in the catalog and get 3 items.
Then I iterate on these items and i'd like to display them.
Is there a way to do that ?
I'd recommend looking at the documentation for Plone's TAL templating language as well as the portal_catalog tool.
Here's a quick example based on the issue you're describing:
<div tal:define="catalog context/portal_catalog;
results python:catalog.searchResults(portal_type='PortletPage');">
<div tal:repeat="item results">
<h3 tal:content="item/pretty_title_or_id" />
<p tal:content="item/Description" />
</div>
</div>

Resources