fateloso Posted March 23, 2012 Share Posted March 23, 2012 I'm a new Prestashop user and noticed that when clicking on CMS block title "Information" a new page opens with all the CMS pages I created. Since I'm using two CMS blocks with absolutely no connection between each other, It would be great if I could remove the link on the title of both the CMS blocks to avoid showing that messy page with all the CMS pages. Is it possible to remove that <a href> on the CMS block title? If not, is there a way to assin each CMS page correctly to each CMS block and just show the ones I selected and not all of them? Thanks in advance. Miguel Link to comment Share on other sites More sharing options...
tdr170 Posted March 24, 2012 Share Posted March 24, 2012 Yes this is possible go to modules/blockcms and edit the blockcms.tpl file. At the very top you should see lines like this, the red text needs to be removed from the line. (h4 line) (change this) <!-- Block CMS module --> {foreach from=$cms_titles key=cms_key item=cms_title} <div id="informations_block_left_{$cms_key}" class="block informations_block_left"> <h4><a href="{$cms_title.category_link}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a></h4> <ul class="block_content"> (to this) <!-- Block CMS module --> {foreach from=$cms_titles key=cms_key item=cms_title} <div id="informations_block_left_{$cms_key}" class="block informations_block_left"> <h4>{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</h4> <ul class="block_content"> Link to comment Share on other sites More sharing options...
fateloso Posted March 24, 2012 Author Share Posted March 24, 2012 Hi tdr170. Thank you very, very much. It worked flawlessly and it's exactly what I wanted. Miguel Link to comment Share on other sites More sharing options...
tdr170 Posted March 24, 2012 Share Posted March 24, 2012 Your very welcome glad to help. Link to comment Share on other sites More sharing options...
Cornel_M Posted March 27, 2013 Share Posted March 27, 2013 Hi in prestashop 1.5.3.1 is not working. i have this code: <!-- Block CMS module --> {foreach from=$cms_titles key=cms_key item=cms_title} <div id="informations_block_left_{$cms_key}" class="block informations_block_left"> <h4 class="title_block"><a href="{$cms_title.category_link}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a></h4> <ul class="block_content"> {foreach from=$cms_title.categories item=cms_page} {if isset($cms_page.link)}<li class="bullet"><b style="margin-left:2em;"> <a href="{$cms_page.link}" title="{$cms_page.name|escape:html:'UTF-8'}">{$cms_page.name|escape:html:'UTF-8'}</a> </b></li>{/if} {/foreach} {foreach from=$cms_title.cms item=cms_page} {if isset($cms_page.link)}<li><a href="{$cms_page.link}" title="{$cms_page.meta_title|escape:html:'UTF-8'}">{$cms_page.meta_title|escape:html:'UTF-8'}</a></li>{/if} {/foreach} {if $cms_title.display_store}<li><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if} </ul> </div> {/foreach} <!-- /Block CMS module --> any help please? Link to comment Share on other sites More sharing options...
julians Posted April 12, 2013 Share Posted April 12, 2013 Hi Tdr170! I've tried your solution... but it's not working for me. Should i regenerate templates after doing this or something like that? Thanks! Yes this is possible go to modules/blockcms and edit the blockcms.tpl file. At the very top you should see lines like this, the red text needs to be removed from the line. (h4 line) (change this) <!-- Block CMS module --> {foreach from=$cms_titles key=cms_key item=cms_title} <div id="informations_block_left_{$cms_key}" class="block informations_block_left"> <h4><a href="{$cms_title.category_link}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a></h4> <ul class="block_content"> (to this) <!-- Block CMS module --> {foreach from=$cms_titles key=cms_key item=cms_title} <div id="informations_block_left_{$cms_key}" class="block informations_block_left"> <h4>{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</h4> <ul class="block_content"> Link to comment Share on other sites More sharing options...
tdr170 Posted April 13, 2013 Share Posted April 13, 2013 Hi in prestashop 1.5.3.1 is not working. i have this code: <!-- Block CMS module --> {foreach from=$cms_titles key=cms_key item=cms_title} <div id="informations_block_left_{$cms_key}" class="block informations_block_left"> <h4 class="title_block"><a href="{$cms_title.category_link}">{if !empty($cms_title.name)}{$cms_title.name}{else}{$cms_title.category_name}{/if}</a></h4> <ul class="block_content"> {foreach from=$cms_title.categories item=cms_page} {if isset($cms_page.link)}<li class="bullet"><b style="margin-left:2em;"> <a href="{$cms_page.link}" title="{$cms_page.name|escape:html:'UTF-8'}">{$cms_page.name|escape:html:'UTF-8'}</a> </b></li>{/if} {/foreach} {foreach from=$cms_title.cms item=cms_page} {if isset($cms_page.link)}<li><a href="{$cms_page.link}" title="{$cms_page.meta_title|escape:html:'UTF-8'}">{$cms_page.meta_title|escape:html:'UTF-8'}</a></li>{/if} {/foreach} {if $cms_title.display_store}<li><a href="{$link->getPageLink('stores')}" title="{l s='Our stores' mod='blockcms'}">{l s='Our stores' mod='blockcms'}</a></li>{/if} </ul> </div> {/foreach} <!-- /Block CMS module --> any help please? Should be the text in red that needs to be removed, make sure after editing you enable force compile and turn cache off in the BO. This will force a page refresh. Link to comment Share on other sites More sharing options...
tdr170 Posted April 13, 2013 Share Posted April 13, 2013 Hi Tdr170! I've tried your solution... but it's not working for me. Should i regenerate templates after doing this or something like that? Thanks! You're most likely getting cached pages make sure you turn force compile on and cache of in the back office and reload the page. Link to comment Share on other sites More sharing options...
julians Posted April 13, 2013 Share Posted April 13, 2013 You're most likely getting cached pages make sure you turn force compile on and cache of in the back office and reload the page. Hi, thanks for your help! Tried turning off CACHE and force compile ON as you said. I'm still getting no change. Maybe I'm modifying the wrong page? I'm working on themes/PRS040096/modules/blockcms Thanks again! Link to comment Share on other sites More sharing options...
tdr170 Posted April 14, 2013 Share Posted April 14, 2013 Try editing the file in the ..modules/blockcms folder. Link to comment Share on other sites More sharing options...
julians Posted April 14, 2013 Share Posted April 14, 2013 Try editing the file in the ..modules/blockcms folder. Tried that. Still no change. You can check it here http://shop.punto-bebe.com.ar/ Any idea?? Thanks!! Link to comment Share on other sites More sharing options...
tdr170 Posted April 15, 2013 Share Posted April 15, 2013 Tried that. Still no change. You can check it here http://shop.punto-bebe.com.ar/ Any idea?? Thanks!! I do not see a CMS block on this site which block do you want to remove the link from. Link to comment Share on other sites More sharing options...
julians Posted April 15, 2013 Share Posted April 15, 2013 I do not see a CMS block on this site which block do you want to remove the link from. Maybe I misunderstood the thread. I'm looking to remove the top cathegory links from the Block Top Menu. Link to comment Share on other sites More sharing options...
julians Posted April 15, 2013 Share Posted April 15, 2013 Just in case anybody is looking for the same issue, I've just solved. I edited blocktopmenu.php in /modules/blocktopmenu. I changed line 545 inside the case "CMS_CAT", I left it like this: $this->_menu .= '<li><a href="#">'.$category->name.'</a>'; It works just fine! Thanks tdr170 for your time! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now