Jump to content

CMS Block not fully configurable - how to remove extra links?


Recommended Posts

I have a 1.5.4.1 install that I'm configuring. In Preferences->CMS I have the opportunity to create specific CMS pages for the site.

 

WIth the CMS Block module, I have the option to "Display various CMS links and information in the Footer". Below this are checkboxes for all of the CMS pages that I have in my site so that I can choose which ones to have appear or not appear.

 

After enabling the footer display option and selecting two pages, the footer changes to include an "Information" column. The issue is that there are links that display that I do not want displayed, they are not CMS pages, and I see no option to disable them.

 

Specials, Best Sellers, Sitemap are but three examples of the links I do not want displayed in the column. How do you get rid of these without having to turn the whole footer display off for CMS pages?

Link to comment
Share on other sites

Thanks. I had already tried modding the tpl file and wasn't getting the results that I wanted. So, I started looking for the "right" way to do it. I'll obviously have to go back and actually mod the file after all.

 

What I "think" is that it's pretty bold to presume that IF I want to add CMS content to the footer, then I want the all "mandatory" links that are hard-coded in there. Being that this is a module, it should be fully configurable as a module and not require code changes to remove stuff that I don't want in the first place - especially in light of the fact that this is a module coded up by the PrestaShop folks directly!

 

Those links should be pre-built as CMS pages, just like all of the rest, and should be enabled and disabled in exactly the same way.

Edited by ember1205 (see edit history)
  • Like 3
Link to comment
Share on other sites

Thanks. I had already tried modding the tpl file and wasn't getting the results that I wanted. So, I started looking for the "right" way to do it. I'll obviously have to go back and actually mod the file after all.

 

What I "think" is that it's pretty bold to presume that IF I want to add CMS content to the footer, then I want the all "mandatory" links that are hard-coded in there. Being that this is a module, it should be fully configurable as a module and not require code changes to remove stuff that I don't want in the first place - especially in light of the fact that this is a module coded up by the PrestaShop folks directly!

 

Those links should be pre-built as CMS pages, just like all of the rest, and should be enabled and disabled in exactly the same way.

 

I agree with you. I'll be sure to bring it up to the dev team. Many people love the information links at the header, but they want an easy way to remove some of the links.

 

To remove, Specials, Best Sellers, and SiteMap I used this code in the root/themes/yourtheme/modules/blockcms/blockcms.tpl around line 46

 

 <!-- MODULE Block footer -->
<div class="block_various_links" id="block_various_links_footer">
<p class="title_block">{l s='Information' mod='blockcms'}</p>
<ul>
<!--{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if} -->
<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>
<!--{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if} -->
{if $display_stores_footer}<li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}
<li class="item"><a href="{$link->getPageLink($contact_url, true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li>
{foreach from=$cmslinks item=cmslink}
{if $cmslink.meta_title != ''}
<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>
{/if}
{/foreach}
<!--<li><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockcms'}">{l s='Sitemap' mod='blockcms'}</a></li>
{if $display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a class="_blank" href="http://www.prestashop.com">PrestaShop</a>™</li>{/if} -->
</ul>
{$footer_text}
</div>
<!-- /MODULE Block footer --> 

  • Like 2
Link to comment
Share on other sites

So, upon further investigation, it appears that the formatting issue is because I'm using a theme that didn't include a blockcms.tpl file and the one I copied from the default theme is apparently setting different formatting parameters. So, now I have to run without the tpl file and check the source so that I can mod the default theme tpl to implement the correct formatting.

Link to comment
Share on other sites

I don't have anything I can share. This is a store "rewrite" and is being worked on in place on the production server in a subdir. It's user/password protected.

 

However, if there's something in particular that you want me to do in order to get you the details, I'd be happy to find it for you.

 

If you're looking to understand what module is putting the code there, it's the CMS Block module from Presta, v1.1.1.

Edited by ember1205 (see edit history)
Link to comment
Share on other sites

  • 5 weeks later...
  • 4 weeks later...

I agree with you. I'll be sure to bring it up to the dev team. Many people love the information links at the header, but they want an easy way to remove some of the links.

 

To remove, Specials, Best Sellers, and SiteMap I used this code in the root/themes/yourtheme/modules/blockcms/blockcms.tpl around line 46

 

<!-- MODULE Block footer -->
<div class="block_various_links" id="block_various_links_footer">
<p class="title_block">{l s='Information' mod='blockcms'}</p>
<ul>
<!--{if !$PS_CATALOG_MODE}<li class="first_item"><a href="{$link->getPageLink('prices-drop')}" title="{l s='Specials' mod='blockcms'}">{l s='Specials' mod='blockcms'}</a></li>{/if} -->
<li class="{if $PS_CATALOG_MODE}first_{/if}item"><a href="{$link->getPageLink('new-products')}" title="{l s='New products' mod='blockcms'}">{l s='New products' mod='blockcms'}</a></li>
<!--{if !$PS_CATALOG_MODE}<li class="item"><a href="{$link->getPageLink('best-sales')}" title="{l s='Top sellers' mod='blockcms'}">{l s='Top sellers' mod='blockcms'}</a></li>{/if} -->
{if $display_stores_footer}<li class="item"><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if}
<li class="item"><a href="{$link->getPageLink($contact_url, true)}" title="{l s='Contact us' mod='blockcms'}">{l s='Contact us' mod='blockcms'}</a></li>
{foreach from=$cmslinks item=cmslink}
{if $cmslink.meta_title != ''}
<li class="item"><a href="{$cmslink.link|addslashes}" title="{$cmslink.meta_title|escape:'htmlall':'UTF-8'}">{$cmslink.meta_title|escape:'htmlall':'UTF-8'}</a></li>
{/if}
{/foreach}
<!--<li><a href="{$link->getPageLink('sitemap')}" title="{l s='sitemap' mod='blockcms'}">{l s='Sitemap' mod='blockcms'}</a></li>
{if $display_poweredby}<li class="last_item">{l s='Powered by' mod='blockcms'} <a class="_blank" href="http://www.prestashop.com">PrestaShop</a>™</li>{/if} -->
</ul>
{$footer_text}
</div>
<!-- /MODULE Block footer -->

 

Hi Benjamin,

 

Thanks for the guidelines. I agree with the other comments, it should be possible to configure which of these "default" links one wants to use in their shop, without having to go into the code.

 

Your workaround functions well. Thanks.

Link to comment
Share on other sites

Hi Benjamin,

 

Thanks for the guidelines. I agree with the other comments, it should be possible to configure which of these "default" links one wants to use in their shop, without having to go into the code.

 

Your workaround functions well. Thanks.

 

I do agree that this module should be upgraded. I will check with the team to see if we can implement this in upcoming versions. 

Link to comment
Share on other sites

  • 2 months later...

I have found around 10-20 forum posts on the poor cms block, that really needs a overhaul.

 

What i am surprised is that they just released recently 1.5.6.1 and this was not included as a fix in the cms block.

Benjamin, i know you are part of the presta team, and we really congratulate you on your tireless support and help around here. Do you know why this wasn't included in the latest fix.  You discovered this issue in August, and yourself agreed that needs needs to be changed.  I dont see it as a big time consuming fix. Since August, their have been 3 release versions, and none of them included this basic fix.

 

Hope to hear your feedback.

 

Thanks

RICKY

Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...

It is one of the worst parts to do how to make a good footer as you cant catagorize your cms pages....

 

 

It is something that has been suggested, but it's not in the Feedback section. I suggest you add it here http://feedback.prestashop.com/forums/124931-general

 

Have as many people vote for it as you can. For now, the only remove specific links would be through the code that is outlined in this post.

 

Thanks

Link to comment
Share on other sites

It is something that has been suggested, but it's not in the Feedback section. I suggest you add it here http://feedback.prestashop.com/forums/124931-general

 

Have as many people vote for it as you can. For now, the only remove specific links would be through the code that is outlined in this post.

 

Thanks

 

And why did it take nine months for this process to be suggested as a means of having it updated?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...