other menu in joomla - joomla

I use joomla 2.5, I create a menu to put inside a module.
In the index of my template I have this
<div id="wrapper-header-left" class="column grid_6">
<?php if ($this->countModules('mod_imagenMenu')): ?>
<jdoc:include type="modules" name="mod_imagenMenu" style="none"/>
<?php endif; ?>
<?php if ($this->countModules('mod_izquierdo')): ?>
<jdoc:include type="modules" name="mod_izquierdo" style="none"/>
<?php endif; ?>
</div>
<div id="wrapper-header-right" class="column grid_10">
<?php if ($this->countModules('mod_extranet')): ?>
<jdoc:include type="modules" name="mod_extranet" style="none"/>
<?php endif; ?>
<div id="Menu_Principal">
<ul class="menu">
<?php if ($this->countModules('mod_menuPrincipal')): ?>
<jdoc:include type="modules" name="mod_menuPrincipal" style="none"/>
<?php endif; ?>
</ul>
</div>
</div>
mod_izquierdo inside this module I want to show a menu
In the default.php file of this module I call the menu
<div class="conozca">
<p>Conozca más sobre Arq/p>
<ul>
<!--<li>¿Cómo adquirir Arq?</li>
<li>¿Qué equipos componen Arq?</li> -->
</ul>
</div>
But when I render the page I don't see the menu, if I put this line
<jdoc:include type="modules" name="mod_ar_menu" style="none"/>
in the index I show the menu duplicate.
What is my error, can I put the menu inside the module?

You really shouldn't be calling specific modules in your template like that, it is going to make your life a lot harder if you ever have to make changes. First thing you need to understand is that the index.php in your template should only contain module positions. It should look more like this -
<div id="wrapper-body" class="row">
<jdoc:include type="modules" name="top" style="none"/>
<div class="clr"></div>
<div id="content" class="column grid_16">
<jdoc:include type="modules" name="top-middle" style="none"/>
<jdoc:include type="component" />
<jdoc:include type="modules" name="bottom-middle" style="none"/>
</div>
<div class="clr"></div>
<jdoc:include type="modules" name="left-column" style="none"/>
<div class="clr"></div>
<jdoc:include type="modules" name="right-column" style="none"/>
<div class="clr"></div>
<jdoc:include type="modules" name="bottom" style="none"/>
<div class="clr"></div>
</div>
This page is supposed to be used to create the basic structure of the site. If you want to really get fancy, you would make each module position collapsible so that any position not being used does on a particular page does no output any code. That would look something like this -
<?php if ($this->countModules('top')) : ?>
<div id="top"><jdoc:include type="modules" name="top" style="none" /></div>
<?php endif; ?>
Once you have your positions worked out, you can now create instances of modules and assign them to the position you want them to display in as well as the page or pages you want it to display on. In the Extensions Menu, click the Module Manager link. There you will create new modules. In the module parameters there is a selection for which module position you want to display the module in. Below that, you can also select which menu items you want the module to display on. You can select All, None, Exclude Selection, or Only on Selection.
Doing it this way makes it very easy to manage your modules. It allows you to put more than one module in a particular position, then select the order they are in within that position. For example you could put a menu module, login module, and image rotator module all in the left column. It also makes you code a lot cleaner since you are not having to call a module within a module like you are trying to do. That is only going to make your site hard to manage and it will slow down performance.

Related

Double ID tag in Materialize css Joomla

I am currently making a template in Joomla using Materialize CSS as the framework. I get stuck with the part where I make a dropdown menu in Joomla. The HTML should go as followed (as explained on the documentation page of Materialize)
<!-- Dropdown Structure -->
<ul id="dropdown1" class="dropdown-content">
<li>one</li>
<li>two</li>
<li class="divider"></li>
<li>three</li>
</ul>
<li>
<a class="dropdown-button" href="#!" data-activates="dropdown1">Dropdown<i class="material-icons right">arrow_drop_down</i></a>
</li>
My index.php goes as follows:
<!-- Start Navbar -->
<nav class="indigo" role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" href="index.php" class="brand-logo">
<?php echo $logo; ?>
<?php if ($this->params->get('sitedescription')) : ?>
<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription')) . '</div>'; ?>
<?php endif; ?>
</a>
<ul class="right hide-on-med-and-down">
<jdoc:include type="modules" name="position-1" style="none" />
</ul>
<ul id="nav-mobile" class="side-nav">
<li class="material-menu">
<a href="index.php">
<?php echo $logo; ?>
<?php if ($this->params->get('sitedescription')) : ?>
<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription')) . '</div>'; ?>
<?php endif; ?>
</a>
</li>
<jdoc:include type="modules" name="position-1" style="none" />
</ul>
<i class="mdi mdi-menu"></i>
</div><!-- /nav-wrapper container -->
</nav>
<!-- End Navbar -->
The problem is that I use the menu module twice because of the mobile menu. An ID tag can only be used once so the dropdown doesn't work.
Does anyone know how I can fix this?
Its not a good idea to have the same module position duplicated in the template multiple times as it will render the same markup every time.
Instead, the best approach is to create a copy of the menu module and publish it to your mobile menu position.
In Joomla Admin, duplicate the current menu module
Publish the duplicated menu module to a new position e.g. "mobile-nav". All other settings for this duplicated module can be identical to the original (desktop) menu module.
Update your template code to include position for "mobile-nav" where the mobile navigation should be displayed.
Update template code for new module position (just swap out position-1 with mobile-nav):
<ul id="nav-mobile" class="side-nav">
<li class="material-menu">
<a href="index.php">
<?php echo $logo; ?>
<?php if ($this->params->get('sitedescription')) : ?>
<?php echo '<div class="site-description">' . htmlspecialchars($this->params->get('sitedescription')) . '</div>'; ?>
<?php endif; ?>
</a>
</li>
<jdoc:include type="modules" name="mobile-nav" style="none" />
</ul>

Move magento title xml

i move breadcrumbs, but now i need that Title Page show below, actually html show
<div class="breadcrumbs"></div>
<div class="col-main">
<div class="my-account">
<div class="page-title"></div>
</div>
</div>
I need
<div class="breadcrumbs"></div>
<div class="page-title"></div>
<div class="col-main">
<div class="my-account"></div>
</div>
How can i do this, i suposse is necessary modify xml file but i not find the solution.
Thanks
Well, I choose create new custom block in page.xml
<block type="core/template" name="my_top_title" as="my_top_title" template="page/html/toptitle.phtml"/>
In 2columns-left.phtml,
<?php echo $this->getChildHtml('my_top_title') ?>
In toptitle.phtml
<?php $title=$this->getLayout()->getBlock('head')->getTitle(); ?>
<div class="my-title">
<h1><?php echo $title ?></h1>
</div>
Works fine.

Joomla List All Categories

I use for a menu-item the style "List All Categories".
I want to edit the code, however I cannot find this file anywhere!
I supposed it should be in components/com_content/views/category but no file I find there seems to be related to the html output.
This is an example of the HTML output:
<div class="categories-list">
<div class="category-item first">
<h3 class="page-header item-title"><a
href="/joomla/index.php/browse/8-eat-meet">
EAT&MEET</a>
</h3>
<img src="/joomla/images/cat1.jpg"/>
</div>
<div class="category-item">
<h3 class="page-header item-title"><a
href="/joomla/index.php/browse/9-dreaming">
DREAMING</a>
</h3>
<img src="/joomla/images/cat2.jpg"/>
</div>
Does anyone know where I can find this file?
Thank you.
That's because categories are generally attached to existing extensions, the majority use case being articles. My assumption here is these are the categories you are referring to. If you selected the "List all categories" menu option from the Articles sub-group, then the assumption is correct. The path is:
components/com_content/views/categories/tmpl
If you would like to change these files, I HIGHLY recommend not editing the core files but using template overrides to customize. See link below for specifics.
http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core
If it is the categorIES layout that you want that will be in the components/com_content/views/categories/tmpl categories folder (I'm assuming you are talking about in the front end).
The layout files are in the tmpl folder.
In Joomla 3.2 you will find that these files reference the files layouts/content/categories_default.php and layouts/content/categories_default_items.php.
This is because the core layouts are the same for all categories (and they can be used by any component that uses categories).
You can override both the tmpl files and the layouts in the html folder of your template.
Update
Here is the code block in the categories_default_items layout that produces the title, image and description HTML
<h3 class="page-header item-title">
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($item->id));?>">
<?php echo $this->escape($item->title); ?></a>
<?php if ($this->params->get('show_cat_num_articles_cat') == 1) :?>
<span class="badge badge-info tip hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_NUM_ITEMS'); ?>">
<?php echo $item->numitems; ?>
</span>
<?php endif; ?>
<?php if (count($item->getChildren()) > 0) : ?>
<span class="icon-plus"></span>
<?php endif;?>
</h3>
<?php if ($this->params->get('show_description_image') && $item->getParams()->get('image')) : ?>
<img src="<?php echo $item->getParams()->get('image'); ?>"/>
<?php endif; ?>
<?php if ($this->params->get('show_subcat_desc_cat') == 1) :?>
<?php if ($item->description) : ?>
<div class="category-desc">
<?php echo JHtml::_('content.prepare', $item->description, '', 'com_content.categories'); ?>
</div>
<?php endif; ?>
<?php endif; ?>

about menu in joomla 2.5

Hi everyone I am very new in joomla and i a little confuse for create the menu.
fisrt a create in the administrator site a menu of type mainmenu with categories and articles. And it is fine.
second I create a template the position in my template is this
<positions>
<position>izquierdo</position>
<position>extranet</position>
<position>menuPrincipal</position>
<position>carrusel</position>
<position>noticias</position>
<position>footer</position>
<position>debug</position>
</positions>
I want my menu in this position <position>menuPrincipal</position>
and this is the body in the index of my template
<body class="cabecera <?php ($portada)? "" : "_otra" ?> ">
<div id="wrapper-top" class="fondo <?php ($portada)? "": "_otra" ?> ">
<div class="row">
<jdoc:include type="modules" name="mod_izquierdo" style="none"/>
<div id="wrapper-header-right" class="column grid_10">
<jdoc:include type="modules" name="mod_extranet" style="none"/>
<div id="Menu_Principal">
<ul class="menu">
<jdoc:include type="modules" name="mod_menuPrincipal" style="none"/>
</ul>
</div>
</div>
</div>
</div>
<div id="wrapper-body" class="row">
<div id="content" class="column grid_16">
<jdoc:include type="component" />
<jdoc:include type="modules" name="mod_noticias" style="none"/>
</div>
<div class="clr"></div>
<jdoc:include type="modules" name="mod_carrusel" style="none"/>
<div class="clr"></div>
</div>
<jdoc:include type="modules" name="mod_pie" style="none"/>
</body>
this is work fine, but I don´t undestand very well
this is my menu
<div id="Menu_Principal">
<ul class="menu">
<jdoc:include type="modules" name="mod_menuPrincipal" style="none"/>
</ul>
</div>
I public my menu like that
Main Menu (Public in mod_menuPrincipal)
if I errase this line <jdoc:include type="modules" name="mod_menuPrincipal" style="none"/> don´t show me the menu, but what is the functionality of "mod_menuPrincipal" I create this module to put inside the menu, but at the end I moved the menu to my index and now this module is empty.
what is the proper performance?
Thanks
First, you need to fix the code in your template. The position for your menu should look like this -
<jdoc:include type="modules" name="menuPrincipal" style="none"/>
Next, in the admin, find Module Manager in the Extensions menu. In the module parameters, there is a parameter that allows you to select the module position you want the module to display in. Select menuPrincipal for the menu module. Last, you want to make sure that the module is assigned to at least one menu item. You probably want it to display on All menu items though, that is an option as well.
The
<jdoc:include type="modules" name="mod_menuPrincipal" style="none"/>
is a syntax to show your particular module in specific position in your template.And mod_menuPrincipal is a module, from where your menu code has been generated and displayed in your template position.
For more detail see this link

Joomla - Multiple Instances of Module Divs

I'm used to using Joomla 1.5, and am trying to switch to 2.5.
I have 2 modules in the right position, I expect that there would be 2 boxes (which is what I want), one box for each module. But for some reason it's just adding the second module to the first box.
It's not copying the divs (main_top_box, main_mid_box, main_bottom_box) inside the if statement: <?php if($this->countModules('right')) { ?>, instead it's just putting the <jdoc:include type="modules" name="right"/> commands side by side.
You were able to do this with the code I've used in Joomla 1.5. Have they removed this functionality?
Here's what I see:
Here's what I should see:
Joomla Code:
<?php if($this->countModules('right')) { ?>
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<jdoc:include type="modules" name="right"/>
</div>
</div>
</div>
<?php } ?>
Code Output(Source):
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<div class="custom" >
<h3>Services</h3>
<ul>
<li>Family Law</li>
<li>Collaborative Law</li>
<li>Real Estate</li>
<li>Wills</li>
<li>Estate Planning</li>
<li>Estates</li>
</ul>
<p> </p>
</div>
<div class="custom" >
<h3>Test</h3>
<p>Testing the Right Box</p>
</div>
</div>
</div>
</div>
Should Be(Source):
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<h3>Services</h3>
<ul>
<li>Family Law</li>
<li>Collaborative Law</li>
<li>Real Estate</li>
<li>Wills</li>
<li>Estate Planning</li>
<li>Estates</li>
</ul>
</div>
</div>
</div>
<div class="main_top_box">
<div class="main_mid_box">
<div class="main_bottom_box">
<h3>Test</h3>
<p>Testing the Right Box</p>
</div>
</div>
</div>
You can do this by these to methods
Either Change the order of display the module in the same position in the module manager.
Create separate module position for both the modules and assign them accordingly.

Resources