Hello
Thanks for the great component.
In Joomla! there is such a feature as a take away ItemID from SEF links. Ie instead 1-cat/2-item.html doing cat / item.html.
To do this, insert the following code
<field name="sef_advanced_link"
type="radio" default="0"
label="Sef Advanced Mode"
description="Remove ItemID from Content URL?">
<option value="0">JNO</option>
<option value="1">JYES</option>
</field>
in /administrator/components/com_abook/config.xml
In your component, this function does not work. Please check and correct as possible.
Thank you!
P.S.
in /component/views/view.html.php
this
if ($category->id!="root"){
while($category->id > 1){
$path[] = array('title' => $category->title, 'link' => AbookHelperRoute::getCategoryRoute($category->id.':'.$category->alias));
$category = $category->getParent();
}
if ($category!=''){
$path = array_reverse($path);
foreach ($path as $item){
$pathway->addItem($item['title'], $item['link']);
}
}
}
$pathway->addItem($this->book->title);
replace to this
if ($category->id != "root"){
while($category->id > 1){
$path[] = array('title' => $category->title, 'link' => AbookHelperRoute::getCategoryRoute($category->id.':'.$category->alias));
$category = $category->getParent();
}
}
if ($category != ''){
$path = array_reverse($path);
foreach ($path as $item){
$pathway->addItem($item['title'], $item['link']);
}
}
if ($this->params->get( 'breadcrumb' ) == 2) {
$pathway->addItem($this->book->title);
}
This is a fix to display the sequence of categories.
Thank you again.
Hi evpadallas,
thanks for your interest!
I try to set sef_advanced_link option to 1 (router.php) but there is a problem with authors sef links.
Which problem solves the second piece of code? There is a problem with a path generation?
Bye
Yes, it is correct to build breadcrumbs.
At your option, if you are in category 3, the path is constructed such "cat1> cat2> cat3", and if I go into the book, the way to build such a "cat1> cat2> bookname> bookname". In my version when you are in the category are all exactly the same, but the transition to the book, the path is constructed so: cat1> cat2> cat3> bookname
Hi evpadallas,
I understand. Thank you.
Hello federica,
I'm a little corrected file router and now everything works. File as an attachment. Please, use it in your component. It is absolutely free :D.
Thank you!
Thank you very much evpadallas. Which rows have you modified?
I will add your code in the next abook version.