New Message: Print-Friendly Versions of Manila Pages
webmaster at userland.com
webmaster at userland.com
Sat May 17 21:52:29 PDT 2003
A new message was posted:
Address: http://frontier.userland.com/discuss/msgReader$11809
By: Lawrence Lee (lawrence at userland.com)
<rules><!-- 1.5 spacing -->
<rule><outlineSpacing>1.5</outlineSpacing></rule>
</rules>
A common feature on news sites is print-friendly versions of their articles and pages. These pages have a less complex template with simpler colors and fewer graphics -- they're designed to be printed. Manila includes a built-in feature to allow you to have this on all the pages in your Manila site.
<rules><!-- bold headings -->
<rule level="1" to="1"><textStyle>bold</textStyle></rule>
</rules>
The printFriendlyLink macro
To add a link to a print-friendly version of pages in your site, use the printFriendlyLink macro. You can put it in your template or in particular stories.
Use it like this: {printFriendlyLink ("Print-friendly version of this page")} -- where the text in quotes is anything you want it to be. You can even make it an image if you want, as in {printFriendlyLink (pictureRef ("somePicture"))}.
Viewing print-friendly pages
If you want to view a print-friendly version of a page on someone else's Manila site, and they're not using the printFriendlyLink macro, you can still view a print-friendly version.
Just take the URL and add ?print-friendly=true to the end of it.
For instance, a URL like http:\//www.server.com/ would become http:\//www.server.com/?print-friendly=true.
If there already are search args -- if there already is a ?xxx in the URL, add a &print-friendly=true to the end of the URL.
For instance, a URL like http:\//www.server.com/?a=6&foo=yes would become http:\//www.server.com/?a=6&foo=yes&print-friendly=true.
Here's the {printFriendlyLink ("print friendly version")} of this page.
Notes
You can edit the printer-friendly template on the Advanced Prefs page, just below the Home Page Template form.
See also
Macros.UserLand.Com: <a href="http://macros.userland.com/basic/printFriendlyLink">printFriendlyLink</a>
More information about the Frontier-Server
mailing list