Joomla How to customize main menu - joomla

I am learning joomla and faced the next problem.
Here is the main menu in HTML
<ul>
<li class="active">home</li>
<li>bio</li>
<li>news</li>
<li>projects<span class="ico"></span>
<div class="sub-nav">
<ul>
<li>yegor<br/>zabelov<br/>trio</li>
<li>gurzuf</li>
<li>soundtracks</li>
</ul>
</div><!-- .sub-nav -->
</li>
...
</ul>
How is it possible to customize the main menu in joomla to:
1. add the class .first-lev to some links
2. add the span inside the item with this class
3. add the wrapper div for sub navigation
Appreciate any help.

To add the class to the some links, just go to the admin panel, select your menu item. Go to the link type options->link CSS style, and add class manually.
You need to edit default_component.php or defaul_url.php
You need to edit default.php
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
To customize menu layout, just copy
/modules/mod_menu/tmpl
to:
/templates/your_template/html/mod_menu
And then customize the files you just copied. This files override system mod_menu files.
Don't forget to add:
<folder>html</folder>
at you templateDetails.xml.

Related

Using Static Application Files as Card List Icon

I'm using Application Express 20.1 to set up a simple hub for routing people to other APEX apps/websites. I would like to use a card list with some custom icons that my management put forth. I've:
Uploaded the images to the static application files
Created the static list and tagged the list items with the image from the static application files in the Image/Class field
Set the template options to 'display icons' in the list region attributes
But when I run the page the images don't show where the icon normally would. I've changed the icons to fa images, just to make sure they work and they do. Am I missing a step or is there some kind of file requirement for these images to be used as a list card icon? Thanks in advance.
To accomplish this you have to create a new template for cards lists or modify the existing one.
In the template definition found in Shared Components > Templates, find the item you're looking for (in this case it's Cards) and click on it. Within that you'll need to change the "List Template Current" and "List Template Noncurrent" sections. Below is how the template is originally configured:
<li class="t-Cards-item is-active #A04#">
<div class="t-Card">
<a href="#LINK#" class="t-Card-wrap" #A05#>
<div class="t-Card-icon u-color #A06#"><span class="t-Icon #ICON_CSS_CLASSES#"><span class="t-Card-initials" role="presentation">#A03#</span></span></div>
<div class="t-Card-titleWrap"><h3 class="t-Card-title">#TEXT#</h3><h4 class="t-Card-subtitle">#A07#</h4></div>
<div class="t-Card-body">
<div class="t-Card-desc">#A01#</div>
<div class="t-Card-info">#A02#</div>
</div>
<span class="t-Card-colorFill u-color #A06#"></span>
</a>
You will need to change the t-Card-icon section so it references an image source rather than the Icon CSS class.
<li class="t-Cards-item is-active #A04#">
<div class="t-Card">
<a href="#LINK#" class="t-Card-wrap" #A05#>
*<div class="t-Card-icon u-color #A06#"><img src="#IMAGE#"></img> </div>*
<div class="t-Card-titleWrap"><h3 class="t-Card-title">#TEXT#</h3><h4 class="t-Card-subtitle">#A07#</h4></div>
<div class="t-Card-body">
<div class="t-Card-desc">#A01#</div>
<div class="t-Card-info">#A02#</div>
</div>
<span class="t-Card-colorFill u-color #A06#"></span>
</a>
Changing the image source to #IMAGE# will reference whatever you have set up in your list configuration for that list item in the Image/Class field.

only make last child items links work in mmenu

I make a menu with the mmenu plugin, but I have lots of submenus.All of the items in my main-menu and sub-menus has a link to a page I want to remove the links of parent menus and only the last child menu items had link to the page how I can do that in mmenu.
I want to have a menu like this.
only the items that don't have child menu go to the link!Sorry for my poor english ... :(
<ul>
<li>go to page</li>
<li>
don't go to page
<ul>
<li>go to page</li>
<li>go to page</li>
<li>
don't go to page
<ul>
<li>go to page</li>
<li>go to page</li>
</ul>
</li>
</ul>
</li>
</ul>
i found the way that how to do it
open the main plugin js file and search for this
d.is("span")&&o.addClass(i.fullsubopen))
then change it to this
d.is("span,a")&&o.addClass(i.fullsubopen))

Disabling the top navigation bar (breadcrumbs) in Sphinx ReadTheDocs theme

I would like to disable the top navigation bar of the ReadTheDocs theme. For other theme, for instance classic it is just an option
html_theme = "classic"
html_theme_options = {
"showrelbartop": False
}
How I can modify the read the docs theme to disable this top navigation bar?
Edit:
After processing the source files with make html, I have to remove these lines in html files
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li>Docs ยป</li>
<li></li>
<li class="wy-breadcrumbs-aside">
</li>
</ul>
<hr/>
</div>
to obtain the expected result. Is it possible to obtain this result before compiling the sources with make html?
I assume you refer to the breadcrumbs (breadcrumbs.html). You can simply open the main template file - layout.html - and delete or comment out the following line:
{% include "breadcrumbs.html" %}
An old question, but I needed this as well. A simpler answer than the currently accepted one, which works for Sphinx==3.5.3 and sphinx-rtd-theme==0.5.2 is:
in docs/_templates/, create a file called breadcrumbs.html
in that file, write an html comment like <!-- Empty override file take the place of env/lib/python3.8/site-packages/sphinx_rtd_theme/breadcrumbs.html, which generates the top nav breadcrumbs. -->.
Rebuild, and you're done.

How to remove data from header menu and add new content to it in Magento

I am working with magento.
I have been trying to remove the content from header-menu and add fresh content like
**HOME ABOUTUS SITES CONTACT**
Here is the current situation,
Update
Above is the screen shot that follows after the top-menu
Please guide me to achieve this..
Thank you.
I assume the above menutimes that you've shown in the image are categories. So if you don't need it on the top menu then go to each of the categories (under Catalog -> Manage Categories) in the backend / admin panel and choose "NO" as an value to the option "Include in Navigation Menu". This will remove them from the navigation top menu.
And to bring these menu items
HOME ABOUTUS SITES
Let me describe it for one of the items above. Lets take About Us
At first create the respective CMS static block for "About Us"
Create a category called "About Us"
Go to display settings of the About Us category and choose the display mode as "static block only" and then select the static block "about us"
Save the category and reload your page on the frontend/website
you can find the "about us" category on the top menu and opening it will show the content from the static block.
Repeat the same for the other menu items.
If this helps mark it as answer. Thanks.
I think you didn't want categories in top menu. In place of it you want Custom links like "Home", "About us" etc.
For this open topmenu.phtml file in template->page->html.
In this commented the below line :-
<?php echo $_menu ?>
and in place of it call a static block of name "custom_top_nav" :-
<?php echo $this->getLayout()->createBlock('cms/block')->setBlockId('custom_top_nav')->toHtml() ?>
In this block you can make your custom menu.
We you want both custom links plus categories then you can replace code with this:-
<?php $_menu = $this->getHtml('level-top') ?>
<?php if($_menu): ?>
<div class="nav-container">
<ul id="nav">
<li class="home"> HOME </li>
<?php echo $_menu ?>
</ul>
</div>
<?php endif ?>
Magento hide categories in the header menu - This can be done from your Admin Panel under Manage Categories > To do this is easy if you don't want your categories in top menu of your web site - When you add a new Category Select no for > Include in Navigation Menu * Its under Meta Description at the bottom of the page where you add the the Category name in General Information Tab*

Where to access/alter content generated by Joomla module

I have been tasked with adding a single link to a Joomla v1.5 site. For sake of brevity I won't include the backstory. Long story short ... this Joomla site is being replaced in the near future with Drupal. For the time being I need to add some content to the Joomla version.
I have a menu that consists of a series of <li> items that are hyper links to other pages. I can view the HTML source using FireBug so I can see that the Joomla template code is generating.
The Joomla template code is ...
<jdoc:include type="modules" name="menu5" />
it creates the following HTML
<li>Link #1 Text</li>
<li>Link #2 Text</li>
<li>Link #3 Text</li>
<li>Link #4 Text</li>
I can view the module named menu5 via the Joomla interface but I cannot see any way to edit the content it generates. I can change meta data regarding the menu (Title, Position, Order, Access Level, etc ..), but nothing about changing the content the menu generates. All I want to do is to insert another link in this list. I could modify the template and hardcode it except it needs to be inserted in the middle of the list.
Any Joomla gurus out there that could tell me where to modify the content this module generates?
It sounds like it's a Joomla! Menu module (in the Module Manager you can check the type column and see if its a menu type).
If it is a menu, you will need to use the Menu menu to select the right menu and then add a menu item to it. (Sorry for all the menus, it's a self referential subject).
Typically the menu module will have the same/similar name as the Menu it displays.

Resources