REDAXO - Rootkategorie immer im Titel anzeigen


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. <?php
  2.  
  3. // get the root category of the article
  4.  
  5. $PATH = explode(\"|\",$this->getValue(\"path\"));
  6. $path1 = (isset ($PATH[1])) ? $PATH[1] : \'\';
  7.  
  8. if ($path1 != \'\') {
  9. $category = OOCategory::getCategoryById($path1);
  10. $rootCategory = $category->getName();
  11. }
  12.  
  13.  
  14. ?>
  15.  
  16.  
  17. <title><?php print $rootCategory.\": \".$this->getValue(\"name\") ?></title>

URL: http://forum.redaxo.de/ftopic8690.html?&highlight=name+root+category

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.