- Posts: 12
COMMUNITY FORUM
Removing Article Alias from URL
- brudasven
-
Topic Author
- Offline
- New Member
Less
More
10 years 8 months ago - 10 years 8 months ago #131762
by brudasven
Removing Article Alias from URL was created by brudasven
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
Please Log in or Create an account to join the conversation.
- Alex Webster
-
- Offline
- New Member
Less
More
- Posts: 11
10 years 5 months ago #135154
by Alex Webster
Replied by Alex Webster on topic Removing Article Alias from URL
Hi, I have the same question. How can I remove the article alias from the URL?
I have switched off the option "Use the item title alias" under the SEO section - but that did not help.
I have switched off the option "Use the item title alias" under the SEO section - but that did not help.
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 5 months ago #135163
by Krikor Boghossian
Replied by Krikor Boghossian on topic Removing Article Alias from URL
Hello,
Can you give me an example of your current URLs?
Are you using any other SEO/SEF extensions?
Can you give me an example of your current URLs?
Are you using any other SEO/SEF extensions?
Please Log in or Create an account to join the conversation.
- Alex Webster
-
- Offline
- New Member
Less
More
- Posts: 11
10 years 5 months ago #135173
by Alex Webster
Replied by Alex Webster on topic Removing Article Alias from URL
Hi,
My URL looks the same as the person asking above me.
I would like to make it look like this
I don't have any SEO extensions.
thanks,
Alex
My URL looks the same as the person asking above me.
http://example.com/index.php?option=com_k2&view=item&id=2:item-title&Itemid=620
I would like to make it look like this
http://example.com/index.php?option=com_k2&view=item&id=2&Itemid=620
I don't have any SEO extensions.
thanks,
Alex
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 4 months ago #135217
by Krikor Boghossian
Replied by Krikor Boghossian on topic Removing Article Alias from URL
If you want to use this you need to enable SEF urls.
The advanced SEF url settings only work with sef urls.
The advanced SEF url settings only work with sef urls.
Please Log in or Create an account to join the conversation.
- Alex Webster
-
- Offline
- New Member
Less
More
- Posts: 11
10 years 4 months ago #135256
by Alex Webster
Replied by Alex Webster on topic Removing Article Alias from URL
Hi,
I just tried that but the URL now looks like:
I don't want that.
thanks,
Alex
I just tried that but the URL now looks like:
http://example.com/category/sub-category/itemId
I don't want that.
thanks,
Alex
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 4 months ago #135261
by Krikor Boghossian
Replied by Krikor Boghossian on topic Removing Article Alias from URL
So what do you want?
You wanted to remove the alias from the URL.
This url has no alias in the URL.
You wanted to remove the alias from the URL.
This url has no alias in the URL.
Please Log in or Create an account to join the conversation.
- Alex Webster
-
- Offline
- New Member
Less
More
- Posts: 11
10 years 4 months ago #135268
by Alex Webster
Replied by Alex Webster on topic Removing Article Alias from URL
As I said earlier:
I want to make the URL look like this
thanks
I want to make the URL look like this
http://example.com/index.php?option=com_k2&view=item&id=2&Itemid=620
thanks
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
10 years 4 months ago #135270
by Krikor Boghossian
Replied by Krikor Boghossian on topic Removing Article Alias from URL
Yes. This is not possible as I previously posted
If you want to use this you need to enable SEF urls.
The advanced SEF url settings only work with sef urls.
Please Log in or Create an account to join the conversation.
- Alex Webster
-
- Offline
- New Member
Less
More
- Posts: 11
10 years 4 months ago #135271
by Alex Webster
Replied by Alex Webster on topic Removing Article Alias from URL
OK - Thank you
Please Log in or Create an account to join the conversation.