Page 1 of 1
Disable a page from the Sitemap
Posted: Sat Dec 10, 2011 4:17 am
by cloudier
I have removed the specials page but its still showing in the Site Map listing. Can someone advise me where I can go to remove this item from showing on the sitemap page.
Many thanks
Cloudier
Re: Disable a page from the Sitemap
Posted: Sat Dec 10, 2011 4:19 am
by uksitebuilder
catalog/controller/information/sitemap.php
remove
Code: Select all
$this->data['text_special'] = $this->language->get('text_special');
remove
Code: Select all
$this->data['special'] = $this->url->link('product/special');
catalog/view/theme/default/template/information/sitemap.tpl
remove
Code: Select all
<li><a href="<?php echo $special; ?>"><?php echo $text_special; ?></a></li>
Re: Disable a page from the Sitemap
Posted: Sat Dec 10, 2011 4:21 am
by cloudier
many many thanks for your prompt reply thats great.
I am a newby to Open Cart and have only been using it for this week and think its fantastic...
Even finding the coding fab............thanks again
cloudier
Re: Disable a page from the Sitemap
Posted: Sat Dec 10, 2011 4:26 am
by uksitebuilder
No worries.
If you want to by absolutely rid of it you should also remove it's definition in the language file (although it wont err if you dont).
catalog/language/english/information/sitemap.php
remove
Code: Select all
$_['text_special'] = 'Special Offers';
Re: Disable a page from the Sitemap
Posted: Thu Nov 07, 2013 7:43 pm
by solaris955
Thanks very much for that. It has helped me too. Thanks again.
Re: Disable a page from the Sitemap
Posted: Fri Jan 10, 2014 8:22 am
by mkp007
I need to hide the specials page too.
Can you make a vqmod file for me for this?
Re: Disable a page from the Sitemap
Posted: Wed May 22, 2019 3:41 pm
by steezy
how about removing links, please see sample from attached image, thanks!
Re: Disable a page from the Sitemap
Posted: Tue Jun 04, 2019 6:52 pm
by cedcommerceteam
Hello mkp007,
If you want to hide
specials in sitemap, use following code :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<code>cedcommerce_sitemap</code>
<name>Sitemap</name>
<version>1.0</version>
<author>CedCommerce Private Limited</author>
<link>http://cedcommerce.com</link>
<!--********************View of Site Map **************************-->
<file path="catalog/view/theme/default/template/information/sitemap.tpl">
<operation>
<search>
<![CDATA[<li><a href="<?php echo $special; ?>"><?php echo $text_special; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
</file>
</modification>
Create a file named '
sitemap.ocmod.xml' & paste above code. Upload file & Specials won't appear in sitemap.
If you have any further queries do write us.
Thanks & Regards :
Re: Disable a page from the Sitemap
Posted: Tue Jun 04, 2019 6:56 pm
by cedcommerceteam
Hello steezy,
If you want to remove links from sitemap, go with following code :
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<code>cedcommerce_sitemap</code>
<name>Sitemap</name>
<version>1.0</version>
<author>CedCommerce Private Limited</author>
<link>http://cedcommerce.com</link>
<!--********************View of Site Map **************************-->
<file path="catalog/view/theme/default/template/information/sitemap.tpl">
<operation>
<search>
<![CDATA[<li><a href="<?php echo $special; ?>"><?php echo $text_special; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $account; ?>"><?php echo $text_account; ?></a>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search index="4">
<![CDATA[<ul>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $edit; ?>"><?php echo $text_edit; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $password; ?>"><?php echo $text_password; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $address; ?>"><?php echo $text_address; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $history; ?>"><?php echo $text_history; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $download; ?>"><?php echo $text_download; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search index="4">
<![CDATA[</ul>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search index="4">
<![CDATA[</li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $cart; ?>"><?php echo $text_cart; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $checkout; ?>"><?php echo $text_checkout; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
<operation>
<search>
<![CDATA[<li><a href="<?php echo $search; ?>"><?php echo $text_search; ?></a></li>]]>
</search>
<add position="replace" ><![CDATA[
]]>
</add>
</operation>
</file>
</modification>
Create a file named '
sitemap.ocmod.xml' & paste above code. Upload file & links won't appear in sitemap.
Note: This will hide those links from your Sitemap page. If you permanently want to remove those links do ping us & we will help you sort that as well.
If you have any further queries do write us.
Thanks & Regards :