Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. <?php
  2. $currentMenuId = JSite::getMenu()->getActive()->id ;
  3.  
  4. switch ($currentMenuId) {
  5. case 1:
  6. $color = "blue";
  7. break;
  8. case 2:
  9. $color = "red";
  10. break;
  11. case 3:
  12. $color = "green";
  13. break;
  14. default:
  15. $color = "yellow";
  16. }
  17. ?>
  18. <link rel="stylesheet" href="templates/your-template/css/<?php echo $color; ?>.css" type="text/css" />
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement