Frontend_Links_Manager - Version 0.1.0

Version Notes

Frontend Links Manager extension is used to turn on/off the frontend links(top links, footer links, customer navigation links

Download this release

Release Info

Developer Magento Core Team
Extension Frontend_Links_Manager
Version 0.1.0
Comparing to
See all releases


Version 0.1.0

app/code/local/MagePsycho/Xmllinks/Block/Account/Navigation.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MagePsycho_Xmllinks_Block_Account_Navigation extends Mage_Customer_Block_Account_Navigation
3
+ {
4
+ /**
5
+ * Removes link by name
6
+ *
7
+ * @param string $name
8
+ * @return Mage_Page_Block_Template_Links
9
+ */
10
+ public function removeLinkByName($name)
11
+ {
12
+ foreach ($this->_links as $k => $v) {
13
+ if ($v->getName() == $name) {
14
+ unset($this->_links[$k]);
15
+ }
16
+ }
17
+ return $this;
18
+ }
19
+ }
app/code/local/MagePsycho/Xmllinks/Block/Checkout/Links.php ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MagePsycho_Xmllinks_Block_Checkout_Links extends Mage_Checkout_Block_Links
3
+ {
4
+ public function addCheckoutLink()
5
+ {
6
+ /*$helper = Mage::helper('xmllinks');
7
+ if($helper->isActive() && $helper->getConfig('checkout', 'top_links') == 1){
8
+ return null;
9
+ }*/
10
+
11
+ if (!$this->helper('checkout')->canOnepageCheckout()) {
12
+ return $this;
13
+ }
14
+
15
+ $parentBlock = $this->getParentBlock();
16
+ if ($parentBlock && Mage::helper('core')->isModuleOutputEnabled('Mage_Checkout')) {
17
+ $text = $this->__('Checkout');
18
+ $parentBlock->addLink($text, 'checkout', $text, true, array(), 60, null, 'class="top-link-checkout"');
19
+ }
20
+ return $this;
21
+ }
22
+ }
app/code/local/MagePsycho/Xmllinks/Block/System/Config/Info.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Xmllinks
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Xmllinks_Block_System_Config_Info
10
+ extends Mage_Adminhtml_Block_Abstract
11
+ implements Varien_Data_Form_Element_Renderer_Interface
12
+ {
13
+
14
+ /**
15
+ * Render fieldset html
16
+ *
17
+ * @param Varien_Data_Form_Element_Abstract $element
18
+ * @return string
19
+ */
20
+ public function render(Varien_Data_Form_Element_Abstract $element)
21
+ {
22
+ $html = '<div style="background:url(\'http://www.magepsycho.com/_logo.png\') no-repeat scroll 15px center #EAF0EE;border:1px solid #CCCCCC;margin-bottom:10px;padding:10px 5px 5px 200px;">
23
+ <h4>About MagePsycho</h4>
24
+ <p>A Professional Zend PHP5 Certified Developer / Freelancer with specialization in CMS + E-Commerce Solutions.<br />
25
+ View more extensions @ <a href="http://www.magentocommerce.com/magento-connect/developer/MagePsycho" target="_blank">MagentoConnect</a><br />
26
+ <a href="http://www.magepsycho.com/contacts" target="_blank">Request a Quote / Contact Us</a><br />
27
+ Skype me @ magentopycho<br />
28
+ Email me @ <a href="mailto:info@magepsycho.com">info@magepsycho.com</a><br />
29
+ Follow me on <a href="http://twitter.com/magepsycho" target="_blank">Twitter</a><br />
30
+ Visit my website: <a href="http://www.magepsycho.com" target="_blank">www.magespycho.com</a></p>
31
+ </div>';
32
+
33
+ return $html;
34
+ }
35
+ }
app/code/local/MagePsycho/Xmllinks/Block/Xmllinks.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Xmllinks
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Xmllinks_Block_Xmllinks extends Mage_Core_Block_Template
10
+ {
11
+
12
+ }
app/code/local/MagePsycho/Xmllinks/Helper/Data.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Xmllinks
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Xmllinks_Helper_Data extends Mage_Core_Helper_Abstract
10
+ {
11
+ public function getConfig($field, $section = 'option', $default = null){
12
+ $value = Mage::getStoreConfig('xmllinks/'.$section.'/'.$field);
13
+ if(!isset($value) or trim($value) == ''){
14
+ return $default;
15
+ }else{
16
+ return $value;
17
+ }
18
+ }
19
+
20
+ public function log($data){
21
+ if(is_array($data) || is_object($data)){
22
+ $data = print_r($data, true);
23
+ }
24
+ Mage::log($data, null, 'xmllinks.log');
25
+ }
26
+
27
+ public function getUrl($route, $params = array())
28
+ {
29
+ return $this->_getUrl($route, $params);
30
+ }
31
+
32
+ public function isActive(){
33
+ return $this->getConfig('active');
34
+ }
35
+ }
app/code/local/MagePsycho/Xmllinks/Model/System/Config/Source/Yesno.php ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MagePsycho_Xmllinks_Model_System_Config_Source_Yesno
3
+ {
4
+
5
+ /**
6
+ * Options getter
7
+ *
8
+ * @return array
9
+ */
10
+ public function toOptionArray()
11
+ {
12
+ return array(
13
+ array('value' => 0, 'label'=>Mage::helper('xmllinks')->__('Enabled')),
14
+ array('value' => 1, 'label'=>Mage::helper('xmllinks')->__('Disabled')),
15
+ );
16
+ }
17
+
18
+ }
app/code/local/MagePsycho/Xmllinks/Model/Xmllinks.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Xmllinks
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Xmllinks_Model_Xmllinks extends Mage_Core_Model_Abstract
10
+ {
11
+
12
+ }
app/code/local/MagePsycho/Xmllinks/controllers/IndexController.php ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @category MagePsycho
4
+ * @package MagePsycho_Xmllinks
5
+ * @author info@magepsycho.com
6
+ * @website http://www.magepsycho.com
7
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
8
+ */
9
+ class MagePsycho_Xmllinks_IndexController extends Mage_Core_Controller_Front_Action
10
+ {
11
+ public function indexAction()
12
+ {
13
+
14
+ }
15
+ }
app/code/local/MagePsycho/Xmllinks/etc/adminhtml.xml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Xmllinks
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <acl>
13
+ <resources>
14
+ <admin>
15
+ <children>
16
+ <system>
17
+ <children>
18
+ <config>
19
+ <children>
20
+ <magepychoinfo>
21
+ <title>MagePsycho - Information</title>
22
+ </magepychoinfo>
23
+ <xmllinks>
24
+ <title>Xml Links Manager Section</title>
25
+ </xmllinks>
26
+ </children>
27
+ </config>
28
+ </children>
29
+ </system>
30
+ </children>
31
+ </admin>
32
+ </resources>
33
+ </acl>
34
+ </config>
app/code/local/MagePsycho/Xmllinks/etc/config.xml ADDED
@@ -0,0 +1,124 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Xmllinks
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <modules>
13
+ <MagePsycho_Xmllinks>
14
+ <version>0.1.0</version>
15
+ </MagePsycho_Xmllinks>
16
+ </modules>
17
+ <global>
18
+ <models>
19
+ <xmllinks>
20
+ <class>MagePsycho_Xmllinks_Model</class>
21
+ </xmllinks>
22
+ </models>
23
+ <blocks>
24
+ <xmllinks>
25
+ <class>MagePsycho_Xmllinks_Block</class>
26
+ </xmllinks>
27
+ <customer>
28
+ <rewrite>
29
+ <account_navigation>MagePsycho_Xmllinks_Block_Account_Navigation</account_navigation>
30
+ </rewrite>
31
+ </customer>
32
+ <!--<checkout>
33
+ <rewrite>
34
+ <links>MagePsycho_Xmllinks_Block_Checkout_Links</links>
35
+ </rewrite>
36
+ </checkout>-->
37
+ </blocks>
38
+ <helpers>
39
+ <xmllinks>
40
+ <class>MagePsycho_Xmllinks_Helper</class>
41
+ </xmllinks>
42
+ </helpers>
43
+ </global>
44
+ <frontend>
45
+ <routers>
46
+ <xmllinks>
47
+ <use>standard</use>
48
+ <args>
49
+ <module>MagePsycho_Xmllinks</module>
50
+ <frontName>xmllinks</frontName>
51
+ </args>
52
+ </xmllinks>
53
+ </routers>
54
+ <layout>
55
+ <updates>
56
+ <xmllinks>
57
+ <file>xmllinks.xml</file>
58
+ </xmllinks>
59
+ </updates>
60
+ </layout>
61
+ </frontend>
62
+ <adminhtml>
63
+ <acl>
64
+ <resources>
65
+ <admin>
66
+ <children>
67
+ <system>
68
+ <children>
69
+ <config>
70
+ <children>
71
+ <magepychoinfo>
72
+ <title>MagePsycho - Information</title>
73
+ </magepychoinfo>
74
+ <xmllinks>
75
+ <title>Xml Links Manager Section</title>
76
+ </xmllinks>
77
+ </children>
78
+ </config>
79
+ </children>
80
+ </system>
81
+ </children>
82
+ </admin>
83
+ </resources>
84
+ </acl>
85
+ </adminhtml>
86
+ <default>
87
+ <xmllinks>
88
+ <option>
89
+ <active>1</active>
90
+ </option>
91
+ <top_links>
92
+ <my_account>0</my_account>
93
+ <my_wishlist>0</my_wishlist>
94
+ <my_cart>0</my_cart>
95
+ <checkout>0</checkout>
96
+ <login>0</login>
97
+ </top_links>
98
+ <footer_links>
99
+ <static_block_links>0</static_block_links>
100
+ <sitemap>0</sitemap>
101
+ <search_terms>0</search_terms>
102
+ <advanced_search>0</advanced_search>
103
+ <contact_us>0</contact_us>
104
+ </footer_links>
105
+ <customer_navigation>
106
+ <account_dashboard>0</account_dashboard>
107
+ <account_information>0</account_information>
108
+ <address_book>0</address_book>
109
+ <my_orders>0</my_orders>
110
+ <billing_agreements>0</billing_agreements>
111
+ <recurring_profiles>0</recurring_profiles>
112
+ <my_product_reviews>0</my_product_reviews>
113
+ <my_tags>0</my_tags>
114
+ <my_wishlist>0</my_wishlist>
115
+ <my_downloadable_products>0</my_downloadable_products>
116
+ <newsletter_subscriptions>0</newsletter_subscriptions>
117
+ </customer_navigation>
118
+ <catalog_navigation>
119
+ <home_active>1</home_active>
120
+ <home_label>Home</home_label>
121
+ </catalog_navigation>
122
+ </xmllinks>
123
+ </default>
124
+ </config>
app/code/local/MagePsycho/Xmllinks/etc/system.xml ADDED
@@ -0,0 +1,318 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Xmllinks
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <tabs>
13
+ <magepychoall translate="label" module="xmllinks">
14
+ <label>MagePsycho Extensions</label>
15
+ <sort_order>400</sort_order>
16
+ </magepychoall>
17
+ </tabs>
18
+ <sections>
19
+ <magepychoinfo translate="label" module="xmllinks">
20
+ <label>Info</label>
21
+ <tab>magepychoall</tab>
22
+ <frontend_type>text</frontend_type>
23
+ <sort_order>99999999999</sort_order>
24
+ <show_in_default>1</show_in_default>
25
+ <show_in_website>1</show_in_website>
26
+ <show_in_store>1</show_in_store>
27
+ <groups>
28
+ <info>
29
+ <frontend_model>xmllinks/system_config_info</frontend_model>
30
+ <sort_order>10</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>1</show_in_store>
34
+ </info>
35
+ </groups>
36
+ </magepychoinfo>
37
+
38
+ <xmllinks module="xmllinks">
39
+ <label>Frontend Links Manager</label>
40
+ <tab>magepychoall</tab>
41
+ <frontend_type>text</frontend_type>
42
+ <sort_order>10</sort_order>
43
+ <show_in_default>1</show_in_default>
44
+ <show_in_website>1</show_in_website>
45
+ <show_in_store>1</show_in_store>
46
+ <groups>
47
+ <option translate="label">
48
+ <label>General Settings</label>
49
+ <frontend_type>text</frontend_type>
50
+ <sort_order>10</sort_order>
51
+ <show_in_default>1</show_in_default>
52
+ <show_in_website>1</show_in_website>
53
+ <show_in_store>1</show_in_store>
54
+ <fields>
55
+ <active translate="label">
56
+ <label>Enabled</label>
57
+ <frontend_type>select</frontend_type>
58
+ <source_model>adminhtml/system_config_source_yesno</source_model>
59
+ <sort_order>10</sort_order>
60
+ <show_in_default>1</show_in_default>
61
+ <show_in_website>1</show_in_website>
62
+ <show_in_store>1</show_in_store>
63
+ </active>
64
+ </fields>
65
+ </option>
66
+ <top_links translate="label">
67
+ <label>Top Links</label>
68
+ <frontend_type>text</frontend_type>
69
+ <sort_order>20</sort_order>
70
+ <show_in_default>1</show_in_default>
71
+ <show_in_website>1</show_in_website>
72
+ <show_in_store>1</show_in_store>
73
+ <fields>
74
+ <my_account translate="label">
75
+ <label>My Account</label>
76
+ <frontend_type>select</frontend_type>
77
+ <source_model>xmllinks/system_config_source_yesno</source_model>
78
+ <sort_order>10</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>1</show_in_store>
82
+ </my_account>
83
+ <my_wishlist translate="label">
84
+ <label>My Wishlist</label>
85
+ <frontend_type>select</frontend_type>
86
+ <source_model>xmllinks/system_config_source_yesno</source_model>
87
+ <sort_order>20</sort_order>
88
+ <show_in_default>1</show_in_default>
89
+ <show_in_website>1</show_in_website>
90
+ <show_in_store>1</show_in_store>
91
+ </my_wishlist>
92
+ <my_cart translate="label">
93
+ <label>My Cart</label>
94
+ <frontend_type>select</frontend_type>
95
+ <source_model>xmllinks/system_config_source_yesno</source_model>
96
+ <sort_order>30</sort_order>
97
+ <show_in_default>1</show_in_default>
98
+ <show_in_website>1</show_in_website>
99
+ <show_in_store>1</show_in_store>
100
+ </my_cart>
101
+ <checkout translate="label">
102
+ <label>Checkout</label>
103
+ <frontend_type>select</frontend_type>
104
+ <source_model>xmllinks/system_config_source_yesno</source_model>
105
+ <sort_order>40</sort_order>
106
+ <show_in_default>1</show_in_default>
107
+ <show_in_website>1</show_in_website>
108
+ <show_in_store>1</show_in_store>
109
+ </checkout>
110
+ <login translate="label">
111
+ <label>Login / Logout</label>
112
+ <frontend_type>select</frontend_type>
113
+ <source_model>xmllinks/system_config_source_yesno</source_model>
114
+ <sort_order>50</sort_order>
115
+ <show_in_default>1</show_in_default>
116
+ <show_in_website>1</show_in_website>
117
+ <show_in_store>1</show_in_store>
118
+ </login>
119
+ </fields>
120
+ </top_links>
121
+ <footer_links translate="label">
122
+ <label>Footer Links</label>
123
+ <frontend_type>text</frontend_type>
124
+ <sort_order>30</sort_order>
125
+ <show_in_default>1</show_in_default>
126
+ <show_in_website>1</show_in_website>
127
+ <show_in_store>1</show_in_store>
128
+ <fields>
129
+ <static_block_links translate="label">
130
+ <label>Static Block Links</label>
131
+ <frontend_type>select</frontend_type>
132
+ <source_model>xmllinks/system_config_source_yesno</source_model>
133
+ <sort_order>10</sort_order>
134
+ <show_in_default>1</show_in_default>
135
+ <show_in_website>1</show_in_website>
136
+ <show_in_store>1</show_in_store>
137
+ <comment><![CDATA[This includes the footer links defined in static block with identifier = footer_links.<br /> Ref: About Us & Customer Service]]></comment>
138
+ </static_block_links>
139
+ <sitemap translate="label">
140
+ <label>Sitemap</label>
141
+ <frontend_type>select</frontend_type>
142
+ <source_model>xmllinks/system_config_source_yesno</source_model>
143
+ <sort_order>20</sort_order>
144
+ <show_in_default>1</show_in_default>
145
+ <show_in_website>1</show_in_website>
146
+ <show_in_store>1</show_in_store>
147
+ </sitemap>
148
+ <search_terms translate="label">
149
+ <label>Search Terms</label>
150
+ <frontend_type>select</frontend_type>
151
+ <source_model>xmllinks/system_config_source_yesno</source_model>
152
+ <sort_order>30</sort_order>
153
+ <show_in_default>1</show_in_default>
154
+ <show_in_website>1</show_in_website>
155
+ <show_in_store>1</show_in_store>
156
+ </search_terms>
157
+ <advanced_search translate="label">
158
+ <label>Advanced Search</label>
159
+ <frontend_type>select</frontend_type>
160
+ <source_model>xmllinks/system_config_source_yesno</source_model>
161
+ <sort_order>40</sort_order>
162
+ <show_in_default>1</show_in_default>
163
+ <show_in_website>1</show_in_website>
164
+ <show_in_store>1</show_in_store>
165
+ </advanced_search>
166
+ <contact_us translate="label">
167
+ <label>Contact Us</label>
168
+ <frontend_type>select</frontend_type>
169
+ <source_model>xmllinks/system_config_source_yesno</source_model>
170
+ <sort_order>50</sort_order>
171
+ <show_in_default>1</show_in_default>
172
+ <show_in_website>1</show_in_website>
173
+ <show_in_store>1</show_in_store>
174
+ </contact_us>
175
+ </fields>
176
+ </footer_links>
177
+ <customer_navigation translate="label">
178
+ <label>Customer Navigation</label>
179
+ <frontend_type>text</frontend_type>
180
+ <sort_order>40</sort_order>
181
+ <show_in_default>1</show_in_default>
182
+ <show_in_website>1</show_in_website>
183
+ <show_in_store>1</show_in_store>
184
+ <fields>
185
+ <account_dashboard translate="label">
186
+ <label>Account Dashboard</label>
187
+ <frontend_type>select</frontend_type>
188
+ <source_model>xmllinks/system_config_source_yesno</source_model>
189
+ <sort_order>20</sort_order>
190
+ <show_in_default>1</show_in_default>
191
+ <show_in_website>1</show_in_website>
192
+ <show_in_store>1</show_in_store>
193
+ </account_dashboard>
194
+ <account_information translate="label">
195
+ <label>Account Information</label>
196
+ <frontend_type>select</frontend_type>
197
+ <source_model>xmllinks/system_config_source_yesno</source_model>
198
+ <sort_order>30</sort_order>
199
+ <show_in_default>1</show_in_default>
200
+ <show_in_website>1</show_in_website>
201
+ <show_in_store>1</show_in_store>
202
+ </account_information>
203
+ <address_book translate="label">
204
+ <label>Address Book</label>
205
+ <frontend_type>select</frontend_type>
206
+ <source_model>xmllinks/system_config_source_yesno</source_model>
207
+ <sort_order>40</sort_order>
208
+ <show_in_default>1</show_in_default>
209
+ <show_in_website>1</show_in_website>
210
+ <show_in_store>1</show_in_store>
211
+ </address_book>
212
+ <my_orders translate="label">
213
+ <label>My Orders</label>
214
+ <frontend_type>select</frontend_type>
215
+ <source_model>xmllinks/system_config_source_yesno</source_model>
216
+ <sort_order>50</sort_order>
217
+ <show_in_default>1</show_in_default>
218
+ <show_in_website>1</show_in_website>
219
+ <show_in_store>1</show_in_store>
220
+ </my_orders>
221
+ <billing_agreements translate="label">
222
+ <label>Billing Agreements</label>
223
+ <frontend_type>select</frontend_type>
224
+ <source_model>xmllinks/system_config_source_yesno</source_model>
225
+ <sort_order>60</sort_order>
226
+ <show_in_default>1</show_in_default>
227
+ <show_in_website>1</show_in_website>
228
+ <show_in_store>1</show_in_store>
229
+ </billing_agreements>
230
+ <recurring_profiles translate="label">
231
+ <label>Recurring Profiles</label>
232
+ <frontend_type>select</frontend_type>
233
+ <source_model>xmllinks/system_config_source_yesno</source_model>
234
+ <sort_order>70</sort_order>
235
+ <show_in_default>1</show_in_default>
236
+ <show_in_website>1</show_in_website>
237
+ <show_in_store>1</show_in_store>
238
+ </recurring_profiles>
239
+ <my_product_reviews translate="label">
240
+ <label>My Product Reviews</label>
241
+ <frontend_type>select</frontend_type>
242
+ <source_model>xmllinks/system_config_source_yesno</source_model>
243
+ <sort_order>80</sort_order>
244
+ <show_in_default>1</show_in_default>
245
+ <show_in_website>1</show_in_website>
246
+ <show_in_store>1</show_in_store>
247
+ </my_product_reviews>
248
+ <my_tags translate="label">
249
+ <label>My Tags</label>
250
+ <frontend_type>select</frontend_type>
251
+ <source_model>xmllinks/system_config_source_yesno</source_model>
252
+ <sort_order>90</sort_order>
253
+ <show_in_default>1</show_in_default>
254
+ <show_in_website>1</show_in_website>
255
+ <show_in_store>1</show_in_store>
256
+ </my_tags>
257
+ <my_wishlist translate="label">
258
+ <label>My Wishlist</label>
259
+ <frontend_type>select</frontend_type>
260
+ <source_model>xmllinks/system_config_source_yesno</source_model>
261
+ <sort_order>100</sort_order>
262
+ <show_in_default>1</show_in_default>
263
+ <show_in_website>1</show_in_website>
264
+ <show_in_store>1</show_in_store>
265
+ </my_wishlist>
266
+ <my_downloadable_products translate="label">
267
+ <label>My Downloadable Products</label>
268
+ <frontend_type>select</frontend_type>
269
+ <source_model>xmllinks/system_config_source_yesno</source_model>
270
+ <sort_order>110</sort_order>
271
+ <show_in_default>1</show_in_default>
272
+ <show_in_website>1</show_in_website>
273
+ <show_in_store>1</show_in_store>
274
+ </my_downloadable_products>
275
+ <newsletter_subscriptions translate="label">
276
+ <label>Newsletter Subscriptions</label>
277
+ <frontend_type>select</frontend_type>
278
+ <source_model>xmllinks/system_config_source_yesno</source_model>
279
+ <sort_order>120</sort_order>
280
+ <show_in_default>1</show_in_default>
281
+ <show_in_website>1</show_in_website>
282
+ <show_in_store>1</show_in_store>
283
+ </newsletter_subscriptions>
284
+ </fields>
285
+ </customer_navigation>
286
+ <catalog_navigation translate="label">
287
+ <label>Catalog Navigation</label>
288
+ <frontend_type>text</frontend_type>
289
+ <sort_order>50</sort_order>
290
+ <show_in_default>1</show_in_default>
291
+ <show_in_website>1</show_in_website>
292
+ <show_in_store>1</show_in_store>
293
+ <fields>
294
+ <home_active translate="label">
295
+ <label>Enable Homepage Link</label>
296
+ <frontend_type>select</frontend_type>
297
+ <source_model>adminhtml/system_config_source_yesno</source_model>
298
+ <sort_order>10</sort_order>
299
+ <show_in_default>1</show_in_default>
300
+ <show_in_website>1</show_in_website>
301
+ <show_in_store>1</show_in_store>
302
+ </home_active>
303
+ <home_label translate="label">
304
+ <label>Homepage Link Label</label>
305
+ <frontend_type>text</frontend_type>
306
+ <sort_order>20</sort_order>
307
+ <show_in_default>1</show_in_default>
308
+ <show_in_website>1</show_in_website>
309
+ <show_in_store>1</show_in_store>
310
+ <depends><home_active>1</home_active></depends>
311
+ <comment><![CDATA[If Label is left empty, 'Home' label will be used.]]></comment>
312
+ </home_label>
313
+ </fields>
314
+ </catalog_navigation>
315
+ </groups>
316
+ </xmllinks>
317
+ </sections>
318
+ </config>
app/design/frontend/default/default/layout/xmllinks.xml ADDED
@@ -0,0 +1,59 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <layout>
3
+ <default>
4
+
5
+ <remove name="catalog.topnav" />
6
+ <reference name="top.menu">
7
+ <block type="catalog/navigation" name="catalog.topnav.xmllinks" template="xmllinks/catalog/navigation/top.phtml"/>
8
+ </reference>
9
+
10
+ <reference name="top.links">
11
+ <action method="removeLinkByUrl" ifconfig="xmllinks/top_links/my_account"><url helper="customer/getAccountUrl"/></action>
12
+ <action method="removeLinkByUrl" ifconfig="xmllinks/top_links/my_cart"><url helper="checkout/url/getCartUrl" /></action>
13
+ <action method="removeLinkByUrl" ifconfig="xmllinks/top_links/checkout"><url helper="xmllinks/getUrl"><url>checkout</url></url></action>
14
+ </reference>
15
+
16
+ <reference name="wishlist_link">
17
+ <action method="setTemplate" ifconfig="xmllinks/top_links/my_wishlist"><template>blank-link.phtml</template></action>
18
+ </reference>
19
+
20
+ <reference name="footer_links">
21
+ <action method="removeLinkByUrl" ifconfig="xmllinks/footer_links/sitemap"><url helper="catalog/map/getCategoryUrl" /></action>
22
+ <action method="removeLinkByUrl" ifconfig="xmllinks/footer_links/search_terms"><url helper="catalogsearch/getSearchTermUrl" /></action>
23
+ <action method="removeLinkByUrl" ifconfig="xmllinks/footer_links/advanced_search"><url helper="catalogsearch/getAdvancedSearchUrl" /></action>
24
+ <action method="removeLinkByUrl" ifconfig="xmllinks/footer_links/contact_us"><url helper="xmllinks/getUrl"><url>contacts</url></url></action>
25
+ </reference>
26
+
27
+ <reference name="footer">
28
+ <action method="unsetChild" ifconfig="xmllinks/footer_links/static_block_links"><name>cms_footer_links</name></action>
29
+ </reference>
30
+
31
+ </default>
32
+ <customer_account>
33
+ <reference name="customer_account_navigation">
34
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/account_dashboard"><name>account</name></action>
35
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/account_information"><name>account_edit</name></action>
36
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/address_book"><name>address_book</name></action>
37
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/my_orders"><name>orders</name></action>
38
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/my_tags"><name>tags</name></action>
39
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/my_wishlist"><name>wishlist</name></action>
40
+
41
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/recurring_profiles"><name>recurring_profiles</name></action>
42
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/billing_agreements"><name>billing_agreements</name></action>
43
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/my_downloadable_products"><name>downloadable_products</name></action>
44
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/my_product_reviews"><name>reviews</name></action>
45
+ <action method="removeLinkByName" ifconfig="xmllinks/customer_navigation/newsletter_subscriptions"><name>newsletter</name></action>
46
+ </reference>
47
+ </customer_account>
48
+ <customer_logged_out>
49
+ <reference name="top.links">
50
+ <action method="removeLinkByUrl" ifconfig="xmllinks/top_links/login"><url helper="customer/getLoginUrl"/></action>
51
+ </reference>
52
+ </customer_logged_out>
53
+
54
+ <customer_logged_in>
55
+ <reference name="top.links">
56
+ <action method="removeLinkByUrl" ifconfig="xmllinks/top_links/login"><url helper="customer/getLogoutUrl"/></action>
57
+ </reference>
58
+ </customer_logged_in>
59
+ </layout>
app/design/frontend/default/default/template/xmllinks/blank-link.phtml ADDED
@@ -0,0 +1 @@
 
1
+
app/design/frontend/default/default/template/xmllinks/catalog/navigation/top.phtml ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Top menu for store
4
+ *
5
+ * @see Mage_Catalog_Block_Navigation
6
+ */
7
+ ?>
8
+ <?php
9
+ /**
10
+ * $this->renderCategoriesMenuHtml() supports optional arguments:
11
+ * int Level number for list item class to start from
12
+ * string Extra class of outermost list items
13
+ * string If specified wraps children list in div with this class
14
+ */
15
+ $helper = Mage::helper('xmllinks');
16
+ ?>
17
+ <?php $_menu = $this->renderCategoriesMenuHtml(0,'level-top') ?>
18
+ <?php if($_menu): ?>
19
+ <div class="nav-container">
20
+ <ul id="nav">
21
+ <?php if($helper->getConfig('home_active', 'catalog_navigation')):
22
+ $homeLabel = $helper->getConfig('home_label', 'catalog_navigation', 'Home');
23
+ $isHomeActive = trim($this->helper('core/url')->getCurrentUrl(), '/') == trim(Mage::getUrl(), '/') ? ' active' : null;
24
+ ?>
25
+ <li class="first<?php echo $isHomeActive; ?>">
26
+ <a href="<?php echo Mage::getUrl(); ?>" class="">
27
+ <span><?php echo $homeLabel; ?></span>
28
+ </a>
29
+ </li>
30
+ <?php endif; ?>
31
+ <?php echo $_menu ?>
32
+ </ul>
33
+ </div>
34
+ <?php endif ?>
app/etc/modules/MagePsycho_Xmllinks.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * @category MagePsycho
5
+ * @package MagePsycho_Xmllinks
6
+ * @author info@magepsycho.com
7
+ * @website http://www.magepsycho.com
8
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
9
+ */
10
+ -->
11
+ <config>
12
+ <modules>
13
+ <MagePsycho_Xmllinks>
14
+ <active>true</active>
15
+ <codePool>local</codePool>
16
+ </MagePsycho_Xmllinks>
17
+ </modules>
18
+ </config>
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Frontend_Links_Manager</name>
4
+ <version>0.1.0</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>
8
+ <extends/>
9
+ <summary>Frontend Links Manager extension is used to turn on/off the frontend links(top links, footer links, customer navigation links</summary>
10
+ <description>Frontend Links Manager extension is used to turn on/off the frontend links(top links, footer links, customer navigation links</description>
11
+ <notes>Frontend Links Manager extension is used to turn on/off the frontend links(top links, footer links, customer navigation links</notes>
12
+ <authors><author><name>MagePsycho</name><user>auto-converted</user><email>rajen_k_bhtt@hotmail.com</email></author></authors>
13
+ <date>2011-09-08</date>
14
+ <time>14:06:55</time>
15
+ <contents><target name="magelocal"><dir name="MagePsycho"><dir name="Xmllinks"><dir name="Block"><dir name="Account"><file name="Navigation.php" hash="8853f91041c89971ecf8aec817cecdcd"/></dir><dir name="Checkout"><file name="Links.php" hash="df212cbe21b6ee62e42ddf9d5ac42bac"/></dir><dir name="System"><dir name="Config"><file name="Info.php" hash="b66d3fbadc353bd6a82420e1489ac8b9"/></dir></dir><file name="Xmllinks.php" hash="1134efac273fcaf782dbe2dc98ca30f7"/></dir><dir name="Helper"><file name="Data.php" hash="1501d97432b7b06b13a0eac89f866ffb"/></dir><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="Yesno.php" hash="fb573f0767f5499e31ae444784ddc171"/></dir></dir></dir><file name="Xmllinks.php" hash="c4cb9e7a83ce52a41fee730d780850c5"/></dir><dir name="controllers"><file name="IndexController.php" hash="a3a44f514c9e79435e00faf72f7da58e"/></dir><dir name="etc"><file name="adminhtml.xml" hash="3ba3ab31c77a2e6174de82db7dc68656"/><file name="config.xml" hash="d6576df0c0ccfe46507e3886089e0d57"/><file name="system.xml" hash="a85d4ffd7956e82900518cd02bcfc192"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MagePsycho_Xmllinks.xml" hash="294ca79131f3459cf70f20c9003cfcce"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="xmllinks.xml" hash="28669491bf5f8475e59e76cbb26f0d3e"/></dir><dir name="template"><dir name="xmllinks"><dir name="catalog"><dir name="navigation"><file name="top.phtml" hash="2579e73ca413f2950d1cfcae7d0a6d1f"/></dir></dir><file name="blank-link.phtml" hash="68b329da9893e34099c7d8ad5cb9c940"/></dir></dir></dir></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies/>
18
+ </package>