8ternity Posted January 24, 2020 Share Posted January 24, 2020 Hi, In Prestashop 1.7.5.X i want to remove the title name for CMS PAGE (Conception > Pages). I've located the file into Template/page.tpl we can see: <section id="main"> {block name='page_header_container'} {block name='page_title' hide} <h1 class="page-heading">{$smarty.block.child}</h1> {/block} {/block} I want to add a {if} rule which says - If page-content is cms page "not show this section/or bypass to add the <h1>...</h1>" otherwise show the <h1> class. I have no such experience in developping. Anyone experienced with that? Any help is appreciated. Thanks. 8ternity | Montreal | Canada Link to comment Share on other sites More sharing options...
Knowband Plugins Posted January 25, 2020 Share Posted January 25, 2020 You can achieve the same using the CSS as well. Try adding the following lines in the theme.css file (themes/classic/assets/css/theme.css) at the bottom of the file. Refresh the browser cache after refreshing the page. #cms .page-header { display: none; } 1 Link to comment Share on other sites More sharing options...
8ternity Posted January 25, 2020 Author Share Posted January 25, 2020 (edited) Not working. The full path is "/html/body/main/section/div/div/div/div/div/section/h1" Their is not #cms section in the HTML itself. It's why i think a {if} rules. But i don't know well in php or smarty programmation. I have knowledge on HTML and CSS only. If i use #main, all titles will not be shown (product pages, etc.) Edited January 27, 2020 by 8ternity (see edit history) Link to comment Share on other sites More sharing options...
Knowband Plugins Posted January 28, 2020 Share Posted January 28, 2020 (edited) Sorry, Please try the below code. #cms .page-heading { display: none; } We can see that you header title class is page-heading instead of page-header. #cms i.e. ID of of element is added on the body. Its has been added purposely so that heading will be hidden only from the CMS page. otherwise heading will be removed from the the pages as well.https://nimb.ws/Os2n4U Edited January 28, 2020 by Knowband Plugins Spell mistake (see edit history) Link to comment Share on other sites More sharing options...
robb84 Posted January 26, 2022 Share Posted January 26, 2022 On 1/24/2020 at 5:23 PM, 8ternity said: Hi, In Prestashop 1.7.5.X i want to remove the title name for CMS PAGE (Conception > Pages). I've located the file into Template/page.tpl we can see: <section id="main"> {block name='page_header_container'} {block name='page_title' hide} <h1 class="page-heading">{$smarty.block.child}</h1> {/block} {/block} I want to add a {if} rule which says - If page-content is cms page "not show this section/or bypass to add the <h1>...</h1>" otherwise show the <h1> class. I have no such experience in developping. Anyone experienced with that? Any help is appreciated. Thanks. 8ternity | Montreal | Canada try with: {if $page.page_name != 'cms'} <h1 class="page-heading">{$smarty.block.child}</h1> {/if} In this way, it load the <h1> tag except for cms pages (all) 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