archeolog.cz: Obří Hrad Keltské oppidum Stradonice Habrůvka, jeskyně Býčí skála pravěk datace, časová osa, pravěké dějiny
Apple iPad Smart Case šedá - Samsung Galaxy Tab 10.1 černé - Samsung Galaxy Tab 10.1 bíle - Puzdro Asus Eee Pad Versa černé - Pouzdro Apple iPad Smart Cover černé - Pouzdro POINT OF VIEW Mobii 7" černé - Pouzdro ZTE V9C-1 černé - Pouzdro Google Nexus 7 oražové - Pouzdro Google Nexus 7 šedé - Pouzdro Samsung Galaxy Note 10.1 bíle - Pouzdro Samsung Galaxy Note 10.1 černé
   Témata: Home

Výlety

Foto

Technika

Výhledy

Cestování

K zamyšlení


LINUX4ALL archiv

Na webu

Pobavení

Příroda

Report, Dokument

Sport

Joomla tips and tricks

- STEFi - 2009-12-01 15:48:18
several joomla templates and compoments developer tips and tricks: breadcrumbs navigation inside content component, css list menu separator...

CSS list menu separator


Usual horizontal menu delimiter is pipe "|". There is no any feature like this in the mod_mainmenu in Joomla 1.5.x. In menu module parameters there is separator value that it is used only in case of rendering menu as a table. It is not clean usage of table anymore. The easiest way to create css separator is use override method inside yours template.

1. Create "html/mod_mainmenu" folder inside your template folder.

complete path to this folder: joomla-home/templates/your-template-name/html/mod_mainmenu/

2. Copy default.php from modules/mod_mainmenu/tmpl to created folder.

3. Edit default.php and change
this:

if ($node->name() == 'ul') {
foreach ($node->children() as $child)
{
if ($child->attributes('access') > $user->get('aid', 0)) {
$node->removeChild($child);
}
}


to


if ($node->name() == 'ul') {
foreach ($node->children() as $child)
{
if ($child->attributes('access') > $user->get('aid', 0)) {
$node->removeChild($child);
}
}
$children_count = count($node->children());
foreach ($node->children() as $child) {
if ($children_index == 0) {
$child->addAttribute('class', 'first');
}
if ($children_index == $children_count - 1) {
$child->addAttribute('class', 'last');
}
$children_index++;
}
}


Breadcrumbs navigation inside content component


Sometime graphic designers became crazy and place breadcrumbs navigation in the middle of content. How to solve it. I use again small trick from Joomla forum. I disable bradcrumbs module in module manager. And overwrite com_content for rendering breadcrumbs module directly.

My example:

folder:
my-template/html/com_cocntent/section/

file (I made changes only in this template):
blog.php

change:
I need to place navigation after section description... added code on line 31 after endif of description block:


<?php // ls 20091201 - breadcrumbs
$document = &JFactory::getDocument();
$renderer = &document->loadRenderer('module');
$Module = &JModuleHelper::getModule('mod_breadcrumbs');
echo $renderer->render($Module);
?>




STEFi (c) 2004 - stefi [at] netdev [dot] cz
Pokud chcete zde publikované materiály použít, prosím, informujte mě. If you wish to use these published materials, please, let me know.
0.002 sec