one thing you need to watch for is when you are within the new print view. getting back to the original view seems to better if you dont use {ezurl}. ie.
<a href={concat("/index.php/content/view/full/",$node.node_id,"/")}> Back to normal page view</a>
> Just got this working the other day.
>
> First create a file containing your layout:
>
> design/<yours>/templates/print_pagelayout.tpl
>
> Then you can call it by prepending '/layout/set/print' to
> your urls, ie:
>
> <a
> href={concat("/layout/set/print/content/view/full/",$node.node_id,"/")|ezurl}">print
> view </a>
>
> one thing you need to watch for is when you are within the
> new print view. getting back to the original view seems to
> better if you dont use {ezurl}. ie.
>
> <a
> href={concat("/index.php/content/view/full/",$node.node_id,"/")}>
> Back to normal page view</a>
>
> Hope this helps
> > Paul
i've just realised your question wasn't quite answered by this :) but you can see where its going and what to do.
> > Just got this working the other day.
> >
> > First create a file containing your layout:
> >
> > design/<yours>/templates/print_pagelayout.tpl
> >
> > Then you can call it by prepending '/layout/set/print'
> to
> > your urls, ie:
> >
> > <a
> >
> href={concat("/layout/set/print/content/view/full/",$node.node_id,"/")|ezurl}">print
> > view </a>
> >
> > one thing you need to watch for is when you are within
> the
> > new print view. getting back to the original view seems
> to
> > better if you dont use {ezurl}. ie.
> >
> > <a
> >
> href={concat("/index.php/content/view/full/",$node.node_id,"/")}>
> > Back to normal page view</a>
> >
> > Hope this helps
> >
> > Paul
>
> i've just realised your question wasn't quite answered by
> this :) but you can see where its going and what to do.
> > paul
Great tip Paul, thanks for the input.
I also noticed with this functionality you can also use fullscreen_pagelayout.tpl and popup_pagelayout.tpl, do you know of any others.
> > Just got this working the other day.
> >
> > First create a file containing your layout:
> >
> > design/<yours>/templates/print_pagelayout.tpl
> >
> > Then you can call it by prepending '/layout/set/print'
> to
> > your urls, ie:
> >
> > <a
> >
> href={concat("/layout/set/print/content/view/full/",$node.node_id,"/")|ezurl}">print
> > view </a>
> >
> > one thing you need to watch for is when you are within
> the
> > new print view. getting back to the original view seems
> to
> > better if you dont use {ezurl}. ie.
> >
> > <a
> >
> href={concat("/index.php/content/view/full/",$node.node_id,"/")}>
> > Back to normal page view</a>
> >
> > Hope this helps
> >
> > Paul
>
> i've just realised your question wasn't quite answered by
> this :) but you can see where its going and what to do.
> > paul
Thanks a lot, Paul. Your explanation covers my task entirely. Besides, I am going to tackle the redirection issue with printed pages by just skipping redirection from print view to normal view. Users triggering printable output will simply receive the printable markup in a new browser window. They may print it or close it. Wihin the printable view, one may use ezurl-operators safely to support e.g. multipage print-views. in footer navigation or something.
> > Just got this working the other day.
> >
> > First create a file containing your layout:
> >
> > design/<yours>/templates/print_pagelayout.tpl
> >
> > Then you can call it by prepending '/layout/set/print'
> to
> > your urls, ie:
> >
> > <a
> >
> href={concat("/layout/set/print/content/view/full/",$node.node_id,"/")|ezurl}">print
> > view </a>
> >
> > one thing you need to watch for is when you are within
> the
> > new print view. getting back to the original view seems
> to
> > better if you dont use {ezurl}. ie.
> >
> > <a
> >
> href={concat("/index.php/content/view/full/",$node.node_id,"/")}>
> > Back to normal page view</a>
> >
> > Hope this helps
> >
> > Paul
>
> i've just realised your question wasn't quite answered by
> this :) but you can see where its going and what to do.
> > paul
What do you think about this: <a href={concat('/layout/set/print/',$site.uri.uri)|ezurl} target="new">...</a>
The $site.uri.uri reports the current uri to the template and can be used to obtain a general print button for any kind of content you may display in your pagelayout.
I think <a href={concat("layout/set/print/",$site.uri.tail)|ezurl}>printable version</a> is the correct way to call a printable page. $site.uri.tail gives you the "content/view/44" bit.
I also noticed this code in the link.tpl standard template: