Hi!
I need to add new class for current item in K2_content module.
I get result with this code:
but in not universal.
I tried this code:
But in this case urls have extra slash:
How I can fix it?
Thanks.
I need to add new class for current item in K2_content module.
I get result with this code:
<?php if (JURI::current() == ("https://site.com".$item->link)):
$currentweek = "currentweek";
else:
$currentweek = false;
endif;
?>but in not universal.
I tried this code:
<?php if (JURI::current() == (JURI::base().$item->link)):
$currentweek = "currentweek";
else:
$currentweek = false;
endif;
?>But in this case urls have extra slash:
How I can fix it?
Thanks.
Edited 9 years 11 months ago by Roman Lipatov