understanding the ?alttemplate Options
chris
Posted: Monday, November 24, 2008 3:05:51 PM
Rank: Devotee

Joined: 4/12/2007
Posts: 96
Location: Amsterdam
Hi all,
I'm trying to make a print page but I don't really understand how to do this.....
I've made a link like this http://www.klantenadministratie.nl/dienstverlening/advocaten.aspx?alttemplate=Print (you can see the link at the bottom).
On the print template I'm not sure how to load the bodytext from the page.......on the template I've tried it with a macro (which load bodytext), <?UMBRACO_GETITEM field="bodyText"/>,
{@nodeName} (just looking if it responds!) but I only get a empty page?!
Anyone here with experience in the ?alttemplate feature en knows what I'm doing wrong??
thanks in advance!
Chris
chris
Posted: Monday, November 24, 2008 3:31:04 PM
Rank: Devotee

Joined: 4/12/2007
Posts: 96
Location: Amsterdam
.........I'm blond..........I was trying to load bodyText which wasn't there as bodyText because it is/was loaded dynamically through xslt..........so that's why nothing was shown! Silenced
greetings,
Chris
rsoeteman
Posted: Monday, November 24, 2008 4:12:53 PM

Rank: Aficionado

Joined: 4/3/2008
Posts: 103
Location: The Netherlands
Hi Chris,

Nice thing I learned at the Umbraco course last week is an alternative for the alttemplate querysting parameter. Instead of using the parameter in the url you can also use the folowing url where the last part (print) is you alternative template. Umbraco will automaticly pick that up.

http://www.klantenadministratie.nl/dienstverlening/advocaten/print.aspx

Cheers,

Richard

ASP.NET and Umbraco development - Soeteman Software
chris
Posted: Monday, November 24, 2008 4:33:02 PM
Rank: Devotee

Joined: 4/12/2007
Posts: 96
Location: Amsterdam
Hi Richard,
Thanks for your suggestion! Always nice to hear how things can be made in different ways!
greetings,
Chris
ddrayne
Posted: Monday, November 24, 2008 5:19:39 PM
Rank: Newbie

Joined: 7/28/2008
Posts: 23
Location: Edinburgh
Just a lil warning:

Beware the duplicate content penalty in google (put noindex meta tag on your print template), or alternatively consider clever use of CSS to create a stylesheet that will make the document print-friendly automatically using media="print"

Dan
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.