freelance84 Posted April 10, 2013 Share Posted April 10, 2013 Hello, I want print a page product to PDF, i'm using pdfmyurl.com. In this way all page is printed, with left column, right column and footer. There is a way for disable theme while displaying page product.tpl so i can print pdf only values of product? Thank you Link to comment Share on other sites More sharing options...
vekia Posted April 10, 2013 Share Posted April 10, 2013 but if you disable lerft / right columns - then when someone will browse your website will not see them... Link to comment Share on other sites More sharing options...
freelance84 Posted April 10, 2013 Author Share Posted April 10, 2013 but if you disable lerft / right columns - then when someone will browse your website will not see them... i want give a parameter to product.tpl, like pdf=print and check that parameter in product.tpl and disable template, in other cases show left and right, Link to comment Share on other sites More sharing options...
vekia Posted April 10, 2013 Share Posted April 10, 2013 so, you need to add something like in header.tpl file: {if $smarty.get.pdf !=1} <div id="left_column" class="column grid_2 alpha"> {$HOOK_LEFT_COLUMN} </div> {/if} and in footer tpl: {if $smarty.get.pdf !=1} <div id="right_column" class="column grid_2 omega"> {$HOOK_RIGHT_COLUMN} </div> {/if} Link to comment Share on other sites More sharing options...
freelance84 Posted April 10, 2013 Author Share Posted April 10, 2013 so, you need to add something like in header.tpl file: {if $smarty.get.pdf !=1} <div id="left_column" class="column grid_2 alpha"> {$HOOK_LEFT_COLUMN} </div> {/if} and in footer tpl: {if $smarty.get.pdf !=1} <div id="right_column" class="column grid_2 omega"> {$HOOK_RIGHT_COLUMN} </div> {/if} Thanks, i will try later, but i think it's right way. Thanks a lot! Link to comment Share on other sites More sharing options...
vekia Posted April 10, 2013 Share Posted April 10, 2013 let me know if it works for you :-) Link to comment Share on other sites More sharing options...
freelance84 Posted April 10, 2013 Author Share Posted April 10, 2013 let me know if it works for you :-) Hello solution works. Other solution: Watching in footer.tpl i founded variable $content_only. I use in request &content_only=1 so disable all and get all page contents. Thank you so much. Link to comment Share on other sites More sharing options...
vekia Posted April 10, 2013 Share Posted April 10, 2013 thanks for the info, now i can mark this thread as solved 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