Skip to main content
2 of 2
added 177 characters in body
sv3n
  • 11.7k
  • 7
  • 41
  • 73

If it is an URL parameter you can use

$pageId = Mage::app()->getRequest()->getParam('pageid', 0)

For pages:

$pageId = Mage::registry('current_category')->getId()

You can also modify your single category from your_layout.xml Layout handles for categoris look like:

<CATEGORY_{yourId}>
    <reference ...

For CMS pages:

$pageId = Mage::getSingleton('cms/page')->getId() // use getIdentifie‌​r()
sv3n
  • 11.7k
  • 7
  • 41
  • 73