Persy Jack Posted August 8, 2011 Share Posted August 8, 2011 Hello everyone, I'm integrating phpbb to prestashop as a CMS page. I've created a CMS page "Message Board" which has iframe link to index page of phpbb. It loads fine but because the center column has limited width, I'd like to remove both left and right columns so I can use the whole page under the header of my website. I know putting a conditional if clause on header.tpl and footer.tpl will remove both colums: {if $page_name != 'cms' } {$HOOK_LEFT_COLUMN} //{$HOOK_RIGHT_COLUMN} for footer.tpl {/if} However, I don't want them to disappear on every cms page. Pages such as about us, terms & conditions, etc.. should work as they would normally. I want them to disappear on message board page only. Without the friendly url, the address bar shows /cms.php?id_cms=7 I've tried to use: {if $page_name != 'cms' AND $id_cms !='7'} $HOOK_LEFT_COLUMN} //{$HOOK_RIGHT_COLUMN} for footer.tpl {/if} with no luck, it throws an exception. How can I add id_cms variable as an additional condition so the columns disappear only on specific CMS page? Any help is appreciated. Thank you 1 Link to comment Share on other sites More sharing options...
shokinro Posted August 8, 2011 Share Posted August 8, 2011 very interesting topic about integrating with PHPBB. Actually I am considering integrate PHPBB somehow into PrestaShop. Come back to your question, I think the problem is that you are using variable id_cms in the theme files, I guess it is not assigned to smarty in the page controller. You have to assign the id_cms as smarty variable before you can use it. You can do this in Init() method of FrontPageController class But it is better that you create an override of FrontController or use existing override if it already exists. When you are ready, can you give (PM) me your site URL as reference? thanks 1 Link to comment Share on other sites More sharing options...
Persy Jack Posted August 8, 2011 Author Share Posted August 8, 2011 Thank you for your reply. It actually didn't take too long to figure out, I just had to browse through some smarty documentation. It turns out, calling smarty.get.id_cms (which stands for $_GET['id_cms'] ) does the trick. So place this on both header.tpl and footer.tpl to remove both columns: {if $page_name != 'cms' AND {$smarty.get.id_cms} != '7'} "7" is the id number of the cms page you want it to be disappear on.Now, all I have to do is to create additional css rule to extend center column to entire page. (still using the one defined in global.css) I will PM you the website once I'm done. It's doesn't have a domain name yet. Thanks again for your reply Link to comment Share on other sites More sharing options...
shokinro Posted August 8, 2011 Share Posted August 8, 2011 good to know you got a solution. and you solution is better than mine because you don't have to touch the core files, because it happens to we get data from GET. thanks for your sharing and looking forward to hearing from you soon. Link to comment Share on other sites More sharing options...
Persy Jack Posted August 8, 2011 Author Share Posted August 8, 2011 OK. Finally it shows up as I wanted. On the CMS page, I have the following code: <iframe id="ForumsWrap" src="http://example.com/forum/index.php" scrolling="auto" width="980px" height="700px"></iframe> 980px being the same size as #page, defined in global.css You can probably define a rule for "ForumsWrap" and adjust the size from global.css Now, I'm going to actually integrate prestashop and phpbb so they share the same login credentials. (i've read few articles, so I know it's not too hard) The last will be theming it so it follows the same style of my website. Hope that helps. Link to comment Share on other sites More sharing options...
shokinro Posted August 8, 2011 Share Posted August 8, 2011 thanks for the great the tips. appreciated. Link to comment Share on other sites More sharing options...
pduraes Posted August 9, 2011 Share Posted August 9, 2011 Nice tips, thanks for it, I'm trying to make the same thing but my programming skills are kind of LOW I got almost everything, but i'm stucked with a problem How do you overwrite the center column width value because here the width defined for the iframe is overwrited with the value for the center column (width: 556px;) and I can't get more than this... I hope you understand my bad english Best regards Link to comment Share on other sites More sharing options...
londonxbox360 Posted July 25, 2012 Share Posted July 25, 2012 help can you please show me step by step how to do this. i bought this module and I dont know how to wok it the seller support is broken, http://addons.prestashop.com/en/content-management/3728-wrapper-iframe.html Link to comment Share on other sites More sharing options...
khaledsaied Posted December 26, 2013 Share Posted December 26, 2013 (edited) Thank you for your reply. It actually didn't take too long to figure out, I just had to browse through some smarty documentation. It turns out, calling smarty.get.id_cms (which stands for $_GET['id_cms'] ) does the trick. So place this on both header.tpl and footer.tpl to remove both columns: {if $page_name != 'cms' AND {$smarty.get.id_cms} != '7'}"7" is the id number of the cms page you want it to be disappear on.Now, all I have to do is to create additional css rule to extend center column to entire page. (still using the one defined in global.css) I will PM you the website once I'm done. It's doesn't have a domain name yet. Thanks again for your reply Hi I am running PS 1.5.6.1 and not default template. I was trying your proposal but it did not work, can you help please? Here is my code: {if $page_name != "index" and $page_name != "cms" AND {$smarty.get.id_cms} != '7'} <div id="leo-leftcol" class="span3"> {$HOOK_LEFT_COLUMN} </div><!--leftcol--> {/if} Edited December 26, 2013 by khaledsaied (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 26, 2013 Share Posted December 26, 2013 i checked your page and there is no right column on CMS pages. problem solved? t's enough to post this message one time :/ Link to comment Share on other sites More sharing options...
khaledsaied Posted December 26, 2013 Share Posted December 26, 2013 (edited) i checked your page and there is no right column on CMS pages. problem solved? t's enough to post this message one time :/ Thanks. How can I remove my post ? :s And yes it is solved: 297925 Edited December 26, 2013 by khaledsaied (see edit history) 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