Hi guys,
i write an extension for the component misterestate / estateagent, So, that every Item has their titlename in the uri.
I will publish it here, when it´s ready.
The original link is like:
index.php?option=com_estateagent&act=object&task=showEO&id=1
index.php?option=com_estateagent&act=object&task=showEO&id=2
index.php?option=com_estateagent&act=object&task=showEO&id=3
My extension works, but the id in the translated URI is everytime 1, and the uri shows only the title of the first item, but the intern translation works for every item.
That´s part of it:
extract($vars);
//extract($id);
$title = array();
$id = true;
if (isset($id)) {
$query = \"
SELECT `title`
FROM `jos_estateagent`
WHERE `id` = $id\";
$database->setQuery($query);
$name = $database->loadResult();
}
$title[] = 'expose';
$title[] = '/' . $name;
unset($vars['id']);
The rewrite link looks everytime like this one:
www.domain.de/expose/apartement-1.html
www.domain.de/expose/apartement-2.html
because in the database \"apartement\" is the title with \"id 1\"
So, where is my fault? In the administration, there is the component configuration for the estate component: com_estateagent SKIP, CACHE, DEFAULT.
Only with default, my extension works, is that correct?
Why is the id recognized only as 1 for every link?
Soory `bout my bad english:-)
kind regards