Guest User

Untitled

a guest
May 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. etc/modules/Gentocom_Page.xml
  2. <?xml version="1.0"?>
  3. <config>
  4. <modules>
  5. <Gentocom_Page>
  6. <active>true</active>
  7. <codePool>local</codePool>
  8. </Gentocom_Page>
  9. </modules>
  10. </config>
  11.  
  12. code/local/Gentocom/Page/etc/Config.xml
  13. <?xml version="1.0"?>
  14. <config>
  15. <global>
  16. <blocks>
  17. <page>
  18. <rewrite>
  19. <html_head>Gentocom_Page_Block_Html_Head</html_head>
  20. </rewrite>
  21. </page>
  22. </blocks>
  23. </global>
  24. </config>
  25.  
  26. code/local/Gentocom/Page/Block/Html/Head.php
  27. class Gentocom_Page_Block_Html_Head extends Mage_Page_Block_Html_Head
  28. {
  29. /**
  30. * Check if current url is url for home page
  31. *
  32. * @return true
  33. */
  34. public function getIsHomePage()
  35. {
  36. Mage::log("logging");
  37. Mage::log($this->getUrl('')." - ".$this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true)));
  38. return $this->getUrl('') == $this->getUrl('*/*/*', array('_current'=>true, '_use_rewrite'=>true));
  39. }
  40. }
Add Comment
Please, Sign In to add comment