Author
|
Message
|
Volker Lenz
|
Thursday 27 February 2003 3:38:46 am
I still can't imagine how to make ezp3 fetch a pagelayout other than default. Login pagelayout is automatically fetched when the request uri points to /user/login Not so with printpage-layout. Can somebody comment on this ? Thanks for your efforts. Regards Volker
|
Paul Forsyth
|
Thursday 27 February 2003 4:15:18 am
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
|
Paul Forsyth
|
Thursday 27 February 2003 5:18:38 am
> 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
|
Mike Cohen
|
Friday 28 February 2003 10:46:55 am
> > 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. Thanks, Mike
|
Volker Lenz
|
Monday 03 March 2003 4:01:44 am
> > 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. Kind regards Volker
|
Volker Lenz
|
Monday 03 March 2003 4:22:57 am
> > 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. Regards Volker
|
Tim Ross
|
Friday 06 February 2004 6:59:04 am
Hi, 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: <link rel="Alternate" href={concat("layout/set/print/",$site.uri.tail)|ezurl} media="print" title="{'Printable version'|i18n('design/standard/layout')}" /> In IE this makes the print preview use the print_pagelayout file rather than the standard pagelayout. Hope this helps Tim
|