Добрый ден|вечер|ночь, ребят подскажите плз...
Есть модуль стандартный Хлебные крошки в Joomla 1,5,21, называется mod_breadcrumbs
Он отображает текущее расположение пользователя, и у меня на сайте находиться в самом низу страницы, вверх страницы мне его просто некуда поставить т.к. нет позиции подходящей.
На сайте установлен компонент SOBI2, я сделал определенную степень вложенности, но навигации в этом компоненте чето не нашел... и хотел поставить эти хлебные крошки в верх страницы компонента...
Теперь подробнее...
mod_breadcrumbs состоит из файлов:
- z:\home\test3\www\modules\mod_breadcrumbs\tmpl\
z:\home\test3\www\modules\mod_breadcrumbs\tmpl\index.html
z:\home\test3\www\modules\mod_breadcrumbs\tmpl\default.php
z:\home\test3\www\modules\mod_breadcrumbs\index.html
z:\home\test3\www\modules\mod_breadcrumbs\helper.php
z:\home\test3\www\modules\mod_breadcrumbs\mod_breadcrumbs.php
z:\home\test3\www\modules\mod_breadcrumbs\mod_breadcrumbs.xml
Основной код на сколько я понял в выделеном файле
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<span class="breadcrumbs pathway">
<?php for ($i = 0; $i < $count; $i ++) :
// If not the last item in the breadcrumbs add the separator
if ($i < $count -1) {
if(!empty($list[$i]->link)) {
echo '<a href="'.$list[$i]->link.'" class="pathway">'.$list[$i]->name.'</a>';
} else {
echo $list[$i]->name;
}
echo ' '.$separator.' ';
} else if ($params->get('showLast', 1)) { // when $i == $count -1 and 'showLast' is true
echo $list[$i]->name;
}
endfor; ?>
</span>
Нашел в компоненте SOBI2 файл
- z:\home\test3\www\components\com_sobi2\frontend.class.php
в кототором объявлен клас хедера компонента
вот часть кода:
* build header menu
*/
if ($config->showComponentLink || $config->showAddNewEntryLink || $config->showSearchLink) {
$this->sobi2Header .= "\n\n\n<table class=\"sobi2Header\">\n\t<tr>";
if ($config->showComponentLink) {
$comHref = sobi2Config::sef ( 'index.php?option=com_sobi2&Itemid=' . $Itemid );
$sobiName = $config->key ( $config->sobi2Language, "top_menu_sobi_name", $config->componentName );
$startPageLink = '<a class="sobi2Header" href="' . $comHref . '">' . $sobiName . '</a>';
$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderComLink\" > {$startPageLink} </td>";
}
if ($config->showSearchLink) {
$searchHref = sobi2Config::sef ( 'index.php?option=com_sobi2&sobi2Task=search&Itemid=' . $Itemid );
$searchLink = '<a class="sobi2Header" href="' . $searchHref . '">' . _SOBI2_SEARCH_H . '</a>';
$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\"> {$searchLink} </td>";
}
if ($config->showAddNewEntryLink && $config->allowFeEntr) {
$addHref = sobi2Config::sef ( 'index.php?option=com_sobi2&sobi2Task=addNew&Itemid=' . $Itemid );
$addLink = '<a class="sobi2Header" href="' . $addHref . '">' . _SOBI2_ADD_NEW_ENTRY . '</a>';
$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderAddLink\" > {$addLink} </td>";
}
$msg = sobi2Config::request ( $_REQUEST, "mosmsg", null );
$msg = $msg ? "<div id=\"sobimsg\" class=\"message\">{$msg}</div>" : null;
$this->sobi2Header = $this->sobi2Header . "\n\t</tr>\n</table>\n\n{$msg}\n\n";
}
}
В этом коде походу генериться страничка или хедер компонента соби
так вот код, который первый (из файла z:\home\test3\www\modules\mod_breadcrumbs\tmpl\default.php), вставил в z:\home\test3\www\components\com_sobi2\frontend.class.php перед приведенным кодом...
сохранил файлы, но теперь не заходит в этот компонент, т.е. страничка не генерируется, просто чистый лист...
Ребят помогите кто чем может? может есть какой то другой способ засунуть в страничку нужный модуль... спасибо заранее если че с меня ++++