show a different color according to category

GK User
Sat Mar 15, 2014 9:23 am
I want the category name is displayed in different colors according to the attached example. Where is the file where I can define this? Thanks
User avatar
Fresh Boarder

GK User
Sat Mar 15, 2014 12:09 pm
Hi,
I'm not sure it's possible just like that. Probably it request customization of module.
Ask owner of this page how he do this.
User avatar
Platinum Boarder

GK User
Sun Mar 16, 2014 6:46 pm
Thanks for the answer, i do that in the example, i add in the \plugins\system\jat3\jat3\base-themes\default\html\com_content\featured\default_item.php in my old system Joomla 2.5 j_purity 2 template,

Code: Select all
<div id="categorias">
<?php if ($category == 192){
  print "<c class=\"transportes\">TRANSPORTES\n";
} elseif ($category == 195){
  print "<c class=\"comex\">COMERCIO EXTERIOR\n";
} elseif ($category == 185){
  print "<c class=\"doctrinas\">DOCTRINAS\n";
} elseif ($category == 196){
  print "<c class=\"tributario\">TRIBUTARIO\n";
} elseif ($category == 193){
  print "<c class=\"curiosidades\">CURIOSIDADES\n";
} elseif ($category == 191){
  print "<c class=\"doctrinas\">DOCTRINAS\n";
} elseif ($category == 79){
  print "<c class=\"juridica\">OPINION JURÍDICA\n";
} elseif ($category == 194){
  print "<c class=\"productos\">PRODUCTOS\n";
} elseif ($category == 80){
  print "<c class=\"entrevistas\">ENTREVISTAS\n";
}
?>
</div>


and this...

Code: Select all
c.transportes {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#ff9000;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.comex {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#6996d3;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.doctrinas {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#32ccfe;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.tributario {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#3b5998;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.curiosidades {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#00a480;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.juridico {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#00c5f9;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.productos {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#000000;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   display: table;
}
c.entrevistas {
   text-transform: uppercase;
   text-decoration: none;
   font-size:12px;
   width: auto;
   height: 23px !important;
   color: #FFF;
   background-color:#eb5f5f;
   padding-left: 5px;
   padding-top: 3px;
   padding-bottom: 0px;
   padding-right: 5px;
   margin-left: 0px;
   margin-bottom: 0px;
   display: table;
}


but i dont know where is the file in The World News II Template.
I found one file in \templates\gk_twn2\html\com_content\featured\ but dont work, i think this is not the correct file.
User avatar
Fresh Boarder

GK User
Sun Mar 16, 2014 7:27 pm
But we have exactly this same structure of overridden files as you use JAT3 - it no another way.

But maybe you are using K2 items not standard articles ?
so please check in another folder.
User avatar
Platinum Boarder

GK User
Mon Mar 17, 2014 5:47 pm
yes im using K2 items, i will check other folders and let you know how going, thanks
User avatar
Fresh Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.