Keyword

K2 Categories URL (SH404SEF)

  • Puneet
  • Puneet's Avatar Topic Author
  • Offline
  • New Member
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.

More
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...

Please Log in or Create an account to join the conversation.

More
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 ?

Please Log in or Create an account to join the conversation.

  • Puneet
  • Puneet's Avatar Topic Author
  • Offline
  • New Member
More
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

Please Log in or Create an account to join the conversation.

More
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.

Please Log in or Create an account to join the conversation.

More
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.

More
More
13 years 4 months ago #88898 by B_Dark

Please Log in or Create an account to join the conversation.

More
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

Please Log in or Create an account to join the conversation.

More
10 years 4 months ago #88900 by Lefteris
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.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum