Answer the question
In order to leave comments, you need to log in
How to make CMS Joomla display tags component URL (com_tags) in an adequate way?
For example, now I have started to actively use the SEF Wizard plugin , but it only removes the ID from the URL string. Internal SEF is also included. As a result, when I select an article tag, I follow a link like: site.ru component /tags/ tag /text.html, and I would like to see something like site.ru/tags/text.html. Is it somehow possible to force SEF to process, or rather, hide in this case in the URL the parts of the link highlighted in bold? Not necessarily just such a result, I would like, in principle, to get something more adequate than a link in this case.
Answer the question
In order to leave comments, you need to log in
In short, a temporary solution out of my head is ( AHTUNG! BYDLOKOD! ):
Since I didn’t want site.ru/component/tags/tag/text.html , but site.ru/tegi/text.html , I ended up doing the following:
1. Created a menu item "Tags" (hence the tegi in the url, but that suits me too), this menu item on the site was hidden via CSS ( #menu ul li.item-xxx{display:none}
).
2. I wrote a simple php function, which I pushed into the index.php of the template ( tested on Joomla 3.4.8 ):
function URLRedirect($url_part){
if (strstr(JURI::current(),JURI::base().$url_part)){
$length = strlen(JURI::current());
$last_pos = strrpos(JURI::current(),"/")+1;
$word = substr(JURI::current(),$last_pos,($length-$last_pos));
$new_url = JURI::base()."tegi/".$word;
header("Location:".$new_url);
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question