SilverStripe 3 and breadcrumbs - templates

Like the subject in this question:
Silverstripe Menu, Submenu, and Breadcrumbs
I would like to change the normal breadcrumbs into something else. Normally, the Simple theme puts breadcrumbs in the side panel. I want to change that method and create a Wordpress style set of breadcrumbs on the subject line.
There is a pretty nice set of breadcrumbs in the footer. That may be somewhat redundant but users are used to seeing the Wordpress style so that is the task.
It is clear from the docs how to change the separator character but it is not so clear how to change the page template to have the breadcrumbs in the page content and not a separate set in the sidebar.
Is there a simple way to do this in the Page.ss template?
Example:
MainMenuHome menu1 menu2
menu3
home >> menu1 >> menu2 >> menu3
Page subject menu3
Page Content
Footer
Sitename -> home / menu1 / menu2

Breadcrumbs are called into the template with the $Breadcrumbs variable (see SiteTree.php).
To change the look and feel of the breadcrumbs, you can override the BreadcrumbsTemplate.ss file in your theme.

Related

How to set custom/editable site name and discription Django CMS

How to set a custom/editable sitename and site discription in Django CMS.
The sitename and discription should be editable via Django CMS!
Check the image
I'm not entirely sure what you mean, but if I understand you correctly, you want to
put a placeholder in your template and
add a text plugin to that via the structure view.
<!-- your template, e.g. base.html -->
{% placeholder "title" %}
Then, in your structure view (button at the top right in your screenshot) you should see the placeholder and be able to add a text plugin with the title there.

Load django template dynamically

I've 2 section in my screen. Left section is for showing tabs and right is for displaying that tab template(as shown in screenshot). I'm not able to understand how to load different templates when I click these tabs
For example, when I click change password, I should be able to load change_password.html template
This is by far I've tried with code.
<div class="nav">
<ul>
<li class="active"></i><span class="hidden-xs hidden-sm">Home</span></li>
<li></i><span class="hidden-xs hidden-sm">Change Password</span></li>
<li>Bookings</span></li>
<li></i><span class="hidden-xs hidden-sm">Settings</span></li>
</ul>
</div>
I've tried to use with but no luck.
I've just started with django, so if anything is missed let me know. Thanks for your help!
Screenshot
I think what you're attempting is not possible. If you don't want a page reload upon clicking on a tab, you need to use Javascript to dynamically show/hide elements. If page reload is acceptable, you can create different views for each tab, each view rendering a different html file.
You can use the Django include tag to render another template with the current context. E.g. {% include "foo/bar.html" %} (see documentation here). But this will not solve your problem of displaying different content upon clicking on a tab.

How to set from HTML template where menu is in Joomla

I can't find anything about this. I just made a html template and set it as a joomla template. But one important thing I can't find how to do is how to set menu from template to Joomla. Do I have to make all items of menu again in Joomla and just take css from this?
(In template is menu made from pictures, in css is hover, position etc.)
<nav id="main_nav">
<ul>
<li class="Item1"></li>
<li class="Item2"></li>
</ul>
</nav>
You should define a position in your template where module can be outputted. It's done like this:
<jdoc:include type="modules" name="position_name" style="xhtml" />
It's always a good idea to declare the position in templateDetails.xml too.
Once you're done yo can log in to your joomla backend (administrator), go to extensions > modules. Click new select "menu" from module type selection list. Then fill up the form (you can enter title for the module, select your position, pick a menu that should be rendered here etc) and you're all set.
The menu items you add to the menu selected should appear in your website.

CustomItemGenerator and the Page Editor

Sitecore 6.6 Update 4
We're using CustomItemGenerator 1.0 and I was using this to help build a primary navigation menu for a site. This worked as expected and everything was rendered properly.
My problem is when I attempt to edit the menu via Page Editor; I don't even see the menu.
I use a repeater and repeat over a list of links to include in the nav. Due to the way the HTML was created, each LI element needs to have its own, specific ID ("Nav Id" Field in Sitecore) that ties into the CSS. Code inside of my repeater's ItemDataBound event:
// Cast the item using CustomItemGenerator-generated class
GenericContentPageItem navItem = (GenericContentPageItem)e.Item.DataItem;
liMenuItem.ID = navItem.NavId.Rendered; // I tried "navItem.NavId" by itself as well
So while this renders properly in the browser, it doesn't when I'm in Page Editor:
<li id="<input id='fld_B72EB6696DCF41A49671972D5EA5DEB8_2163B90C08AB4A18970A7F3ECE79DCFC_en_1_f71bd37d18d146c19e222e89fcffe278_3' class='scFieldValue' name='fld_B72EB6696DCF41A49671972D5EA5DEB8_2163B90C08AB4A18970A7F3ECE79DCFC_en_1_f71bd37d18d146c19e222e89fcffe278_3' type='hidden' value=" Home?="">
... instead of it rendering like this:
<li id="Home">...</li>
Now, that having been said, I can change my code to not use the CustomItemGenerator and it works fine in the browser and Page Editor as follows:
GenericContentPageItem navItem = (GenericContentPageItem)e.Item.DataItem;
Item nav = Sitecore.Context.Database.GetItem(navItem.ID);
liMenuItem.ID = nav.Fields["Nav Id"].ToString();
I would like to avoid having to hardcode field names in my code, which is why I am using CustomItemGenerator. Is there something that I'm doing wrong with my code that it doesn't want to work in Page Editor?
Thanks!
If you need the actual value out of the field regardless of if you are in the page editor or not, you want to use the Raw property:
liMenuItem.ID = navItem.NavId.Raw;

How to display module Titles Joomla 2.5

Does anyone know how to turn the title (name) of a module in Joomla 2.5 ? On my site http://www.amidsfo.ru/ now all modules no title (name).
If the show title is enabled and still does not show the title, check your template,
you have to call your module something like this:
<jdoc:include type="modules" name="left" style="xhtml" />
The magic section is style="xhtml", so make sure you have it.
From the Joomla Administration page, choose the menu item Extensions/Module Manager
Locate and edit the module for which you want the title to appear
On the page that appears, in the Details pane, directly below the Title is Show Title - make sure that Show is selected