I have two themes (desktop and iphone) for same store view.
I have created cms pages for both the themes differently due to different look.
so there are 2 about-us pages, 2 contact-us pages..and so on..
Now there is a link called "sitemap" in which all the links of cms pages and categories is showing.
The problem is..
both the links of cms pages are displaying.
The function resoponsible for getting cms pages is as follows..
public function getCMSPages(){
$storeId = $this->helper('core')->getStoreId();
$cms = Mage::getModel('cms/page')->getCollection()
->addFieldToFilter('is_active',1)
->addStoreFilter($storeId);
$url = Mage::getBaseUrl();
$html = "";
foreach($cms as $cmspage):
$page = $cmspage->getData();
if($page['identifier'] == "no-route" || $page['identifier'] == "enable-cookies" || $page['identifier'] == "empty"){
/* do nothing */
} else {
if($page['identifier'] == "home"){
$html .= "<li><a href=\"$url\" title=\"".$page['title']."\">".$page['title']."</a></li>\n";
} else {
$html .= "<li><a href=\"$url".$page['identifier']."\" title=\"".$page['title']."\">".$page['title']."</a></li>\n";
}
}
endforeach;
return $html;
}
Now What I want is..
How can I get theme specific cms page links in the frontend ?