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

If it is an URL parameterURL parameter you can use

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

ForFor pagespages:

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

For CMS pagesYou 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()

If it is an URL parameter you can use

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

For pages

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

For CMS pages:

$pageId = Mage::getSingleton('cms/page')->getId() // use getIdentifie‌​r()

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()
Source Link
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()

For CMS pages:

$pageId = Mage::getSingleton('cms/page')->getId() // use getIdentifie‌​r()