Creare_DynamicSitemap - Version 0.1.3

Version Notes

Updated to work with 1.3 & 1.4 & 1.5 & 1.6

Included Check for enabled pages and stores

Download this release

Release Info

Developer E-Commerce Web Design
Extension Creare_DynamicSitemap
Version 0.1.3
Comparing to
See all releases


Code changes from version 0.1.1 to 0.1.3

app/code/local/Creare/DynamicSitemap/Block/Dynamicsitemap.php CHANGED
@@ -3,17 +3,18 @@ class Creare_DynamicSitemap_Block_Dynamicsitemap extends Mage_Core_Block_Templat
3
 
4
  public function getCreareCMSPages(){
5
 
6
- $cms = Mage::getModel('cms/page')->getCollection();
 
 
 
7
  $url = Mage::getBaseUrl();
8
  $html = "";
9
  foreach($cms as $cmspage):
10
- $page = $cmspage->getData();
11
- if($page['identifier'] == "no-route" || $page['identifier'] == "enable-cookies" || $page['identifier'] == "empty"){ /* do nothing or something here */ } else {
12
- if($page['identifier'] == "home"){
13
- $html .= "<li><a href=\"$url\" title=\"".$page['title']."\">".$page['title']."</a></li>\n"; // this is for a nice local link to home
14
- } else {
15
- $html .= "<li><a href=\"$url".$page['identifier']."\" title=\"".$page['title']."\">".$page['title']."</a></li>\n";
16
- }
17
  }
18
  endforeach;
19
 
3
 
4
  public function getCreareCMSPages(){
5
 
6
+ $cms = Mage::getModel('cms/page')->getCollection()
7
+ ->addStoreFilter(Mage::app()->getStore()->getId())
8
+ ->addFieldToFilter('is_active',1)
9
+ ->addFieldToFilter('identifier',array(array('nin'=>array('no-route','enable-cookies','empty'))));
10
  $url = Mage::getBaseUrl();
11
  $html = "";
12
  foreach($cms as $cmspage):
13
+ $page = $cmspage->getData();
14
+ if($page['identifier'] == "home"){
15
+ $html .= "<li><a href=\"$url\" title=\"".$page['title']."\">".$page['title']."</a></li>\n"; // this is for a nice local link to home
16
+ } else {
17
+ $html .= "<li><a href=\"$url".$page['identifier']."\" title=\"".$page['title']."\">".$page['title']."</a></li>\n";
 
 
18
  }
19
  endforeach;
20
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Creare_DynamicSitemap</name>
4
- <version>0.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
@@ -12,11 +12,13 @@
12
  It lists all of your CMS pages and also a few static pages that need a mention.&#xD;
13
  &#xD;
14
  The purpose of this extension is to make sure that your categories are indexed correctly as well as making your website more user-friendly.</description>
15
- <notes>Updated to work with 1.3</notes>
16
- <authors><author><name>E-Commerce Web Design</name><user>auto-converted</user><email>dev@e-commercewebdesign.co.uk</email></author></authors>
17
- <date>2012-01-13</date>
18
- <time>10:09:49</time>
19
- <contents><target name="magelocal"><dir name="Creare"><dir name="DynamicSitemap"><dir name="Block"><file name="Dynamicsitemap.php" hash="87b42503c1a8aa877c39a03c8e4e12d2"/></dir><dir name="controllers"><file name="IndexController.php" hash="95ff6b1aacceb990e3fb92ffd88cdb43"/></dir><dir name="etc"><file name="config.xml" hash="e9d0142ab70ad5ec7f75a89abbe6b590"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="dynamicsitemap"><file name="sitemap.phtml" hash="c116f0991378cc9910b07eda6e9fb684"/></dir></dir><dir name="layout"><file name="dynamicsitemap.xml" hash="817f2de40f841369ff6165908a19766e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Creare_DynamicSitemap.xml" hash="de1cdb59ce6cdfd540055534f1aa1d9c"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="dynamicsitemap.css" hash="85ace1d1d4c2d0a074fa4fce5dfd2175"/></dir></dir></dir></dir></target></contents>
 
 
20
  <compatible/>
21
- <dependencies/>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Creare_DynamicSitemap</name>
4
+ <version>0.1.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
12
  It lists all of your CMS pages and also a few static pages that need a mention.&#xD;
13
  &#xD;
14
  The purpose of this extension is to make sure that your categories are indexed correctly as well as making your website more user-friendly.</description>
15
+ <notes>Updated to work with 1.3 &amp; 1.4 &amp; 1.5 &amp; 1.6&#xD;
16
+ &#xD;
17
+ Included Check for enabled pages and stores</notes>
18
+ <authors><author><name>E-Commerce Web Design</name><user>EcommerceWD</user><email>dev@e-commercewebdesign.co.uk</email></author></authors>
19
+ <date>2012-02-13</date>
20
+ <time>13:10:35</time>
21
+ <contents><target name="magelocal"><dir name="Creare"><dir name="DynamicSitemap"><dir name="Block"><file name="Dynamicsitemap.php" hash="cd84149049c5b31e40f3eb34ffa7eef7"/></dir><dir name="controllers"><file name="IndexController.php" hash="95ff6b1aacceb990e3fb92ffd88cdb43"/></dir><dir name="etc"><file name="config.xml" hash="e9d0142ab70ad5ec7f75a89abbe6b590"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="template"><dir name="dynamicsitemap"><file name="sitemap.phtml" hash="c116f0991378cc9910b07eda6e9fb684"/></dir></dir><dir name="layout"><file name="dynamicsitemap.xml" hash="817f2de40f841369ff6165908a19766e"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Creare_DynamicSitemap.xml" hash="de1cdb59ce6cdfd540055534f1aa1d9c"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="css"><file name="dynamicsitemap.css" hash="85ace1d1d4c2d0a074fa4fce5dfd2175"/></dir></dir></dir></dir></target></contents>
22
  <compatible/>
23
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
24
  </package>