Hey Guys,
i hope someone can help me with this problem:
i'm trying to get the Article Alias removed from the URL.
Even though i turned off this feature in the K2 settings, the Alias is still in the URL.
so, it looks like this
mypage.xx/index.php?option=com_k2&view=item&id=3:testeintrag-2&Itemid=101
but it should look like this
mypage.xx/index.php?option=com_k2&view=item&id=3&Itemid=101
Can anyone tell me why this is happening?
And while i'm at it:
I have a script that "reads out" (i hope this is the right term) the Username and the Article ID and writes those values into the Database.
Problem is: The Value of the Field "Article ID" is always "0".
Is this because of the Alias in the URL? Or am i just scripting something wrong?
Here is a part of the Script
function generateArrayField($field,$type,$label='',$value=false)
{
$arr=array();
$arr=$field;
$arr=$type;
$arr=$label;
if ('user_id'==$field) $arr=$this->getUserData('id');
elseif ('user_name'==$field) $arr=$this->getUserData('name');
elseif ('user_email'==$field) $arr=$this->getUserData('email');
elseif ('article_id'==$field) $arr=$this->getArticleData('id');
elseif ('article_title'==$field) $arr=$this->getArticleData('title');
else $arr=$value;
$this->arrFields[]=$arr;
}
I'd be really happy if someone could help me out
(And sorry for my bad english)
Cheers
bruda
i hope someone can help me with this problem:
i'm trying to get the Article Alias removed from the URL.
Even though i turned off this feature in the K2 settings, the Alias is still in the URL.
so, it looks like this
mypage.xx/index.php?option=com_k2&view=item&id=3:testeintrag-2&Itemid=101
but it should look like this
mypage.xx/index.php?option=com_k2&view=item&id=3&Itemid=101
Can anyone tell me why this is happening?
And while i'm at it:
I have a script that "reads out" (i hope this is the right term) the Username and the Article ID and writes those values into the Database.
Problem is: The Value of the Field "Article ID" is always "0".
Is this because of the Alias in the URL? Or am i just scripting something wrong?
Here is a part of the Script
function generateArrayField($field,$type,$label='',$value=false)
{
$arr=array();
$arr=$field;
$arr=$type;
$arr=$label;
if ('user_id'==$field) $arr=$this->getUserData('id');
elseif ('user_name'==$field) $arr=$this->getUserData('name');
elseif ('user_email'==$field) $arr=$this->getUserData('email');
elseif ('article_id'==$field) $arr=$this->getArticleData('id');
elseif ('article_title'==$field) $arr=$this->getArticleData('title');
else $arr=$value;
$this->arrFields[]=$arr;
}
I'd be really happy if someone could help me out
(And sorry for my bad english)
Cheers
bruda