Is there a way to get all pages with certain layout?

What I want to achieve is to print all pages that have layout named "page with left sidebar" for example.

I'm new in Magento (in php also :D) so any help would be greatly appreciated.


You'll need to filter the cms/page collection by root_template:

$cmsPageCollection = Mage::getResourceModel('cms/page_collection')
    ->addFieldToFilter('root_template', 'two_columns_left');

Hi you can all cms by cms/page collection

foreach($cmsPages as $eachPage){

get individuals page by

$cms = Mage::getModel('cms/page')->load(cmspageindenfiername, 'identifier');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy