Skip navigation

If you’re having issues with search engine friendly URL’s in K2 you can use the Artio JoomSef component with the Artio JoomSef k2 extension.

You need to change the following file /components/com_sef/sef_ext/com_k2.php.

The following getItemTitle function in the SefExt_com_k2 class needs to be replaced with this function:



    function getItemTitle($id){

        $database =& JFactory::getDBO();



	if(preg_match('!:!', $id)) {

	    $idExplode = explode(':', $id);

	    $id = intval($id[0]);

	};

        $database->setQuery("SELECT `title`, `alias`, `catid` FROM `#__k2_items` WHERE `id` = $id");

        $item = $database->loadObject();



		$cat = $this->getCategoryTitle($item->catid);



		$name = $item->alias;

		array_push($cat, $name);

		

		return $cat;

    }
About these ads

One Comment

  1. I don`t get the category title shown in the pagetitle. Do you have a fix for that? I use Artio JoomSef.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: