- Posts: 10
COMMUNITY FORUM
K2 Categories URL (SH404SEF)
- Puneet
- Topic Author
- Offline
- New Member
Less
More
14 years 1 week ago #88891
by Puneet
K2 Categories URL (SH404SEF) was created by Puneet
Hi,K2 team did a great job and provide additional flexibility for urls generation in v2.4I want to show only last category in category urls like mysite.com/k2 instead of mysite.com/content-construction/k2Is there any way to do this?Thank You.
Please Log in or Create an account to join the conversation.
- Emmanouil
- Offline
- Senior Member
Less
More
- Posts: 58
14 years 1 week ago #88892
by Emmanouil
Replied by Emmanouil on topic K2 Categories URL (SH404SEF)
I want this too please :)
And also remove the "blog" prefix for authors page.I removed it from xml and from K2 configuration backend but its still there...
And also remove the "blog" prefix for authors page.I removed it from xml and from K2 configuration backend but its still there...
Please Log in or Create an account to join the conversation.
- parezar
- Offline
- New Member
Less
More
- Posts: 2
14 years 1 week ago #88893
by parezar
Replied by parezar on topic K2 Categories URL (SH404SEF)
file : 404sef/sef_ext/com_k2.php
string 41 - Can be $query = "SELECT * FROM #__k2_categories WHERE id=".$catid." AND published=1 AND trash=0 AND access<=".$aid;
............._categories WHERE id=".$catid." AND published=0 ?
string 41 - Can be $query = "SELECT * FROM #__k2_categories WHERE id=".$catid." AND published=1 AND trash=0 AND access<=".$aid;
............._categories WHERE id=".$catid." AND published=0 ?
Please Log in or Create an account to join the conversation.
- Puneet
- Topic Author
- Offline
- New Member
Less
More
- Posts: 10
14 years 1 week ago #88894
by Puneet
Replied by Puneet on topic K2 Categories URL (SH404SEF)
@Roman
There is no com_k2.php file in the location you mentioned
There is no com_k2.php file in the location you mentioned
Please Log in or Create an account to join the conversation.
- Emmanouil
- Offline
- Senior Member
Less
More
- Posts: 58
14 years 5 days ago #88895
by Emmanouil
Replied by Emmanouil on topic K2 Categories URL (SH404SEF)
I solved this :)
To remove blog from authors prefix :
File:components/com_k2/sef_ext/com_k2.php
Line:77
Should be: $authorPrefix = $params->get('sh404SefLabelUser');
To show only last category:
File:components/com_k2/sef_ext/com_k2.php
Line:39
Should be: getCategoryPath($row->child, true);
It works for me this way.
To remove blog from authors prefix :
File:components/com_k2/sef_ext/com_k2.php
Line:77
Should be: $authorPrefix = $params->get('sh404SefLabelUser');
To show only last category:
File:components/com_k2/sef_ext/com_k2.php
Line:39
Should be: getCategoryPath($row->child, true);
It works for me this way.
Please Log in or Create an account to join the conversation.
- B_Dark
- Offline
- Premium Member
Less
More
- Posts: 126
13 years 4 months ago #88896
by B_Dark
Replied by B_Dark on topic K2 Categories URL (SH404SEF)
and if you wont to show only the item alias and no the categories? like mysite.com/category-1/my-item-1 to mysite.com/my-item-01any solution?!?!
Please Log in or Create an account to join the conversation.
- BBC
- Offline
- Platinum Member
Less
More
- Posts: 663
- B_Dark
- Offline
- Premium Member
Less
More
- Posts: 126
13 years 4 months ago #88898
by B_Dark
Replied by B_Dark on topic K2 Categories URL (SH404SEF)
Please Log in or Create an account to join the conversation.
- Odin Mayland
- Offline
- Platinum Member
Less
More
- Posts: 404
10 years 4 months ago #88899
by Odin Mayland
Replied by Odin Mayland on topic Re: K2 Categories URL (SH404SEF)
3 years later in v 2.6.8 I would also like to only show the last category in the url.
The sef_ext/com_k2.php no longer has the code that I can edit per this topic.
Does anyone have a solution to only show domain.com/lastcategory instead of domain.com/parentcat/childcat/lastcategory
The sef_ext/com_k2.php no longer has the code that I can edit per this topic.
Does anyone have a solution to only show domain.com/lastcategory instead of domain.com/parentcat/childcat/lastcategory
Please Log in or Create an account to join the conversation.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 4 months ago #88900
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: K2 Categories URL (SH404SEF)
@modernmagic
Hi. Are you talking about category links or item links. The code that generates the category links can be found in line 196 of file sef_ext/com_k2.php.
Hi. Are you talking about category links or item links. The code that generates the category links can be found in line 196 of file sef_ext/com_k2.php.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.