Template-toolkit

software development

#1

I’d like to try learning a templating system like Template-toolkit. Does anyone know how to get template-toolkit running on Dreamhost or if it’s even possible? Sorry if this is the wrong place to post this.


#2

I think it may be installed already.

Although I did try an install using cpan which was only 99.23% successful :slight_smile:
So I cannot believe that I installed it!

Did you SSH in and try ‘man template::manual’ from the prompt.

Certainly I just tried the tutorial:-

After creating example.html and files header ,footer.

Where example.html contains…

[% INCLUDE header
title = ‘This is an HTML example’;

pages = [
{ url = 'http://foo.org
title = ‘The Foo Organisation’
}
{ url = 'http://bar.org
title = ‘The Bar Organisation’
}
]
%]

Some Interesting Links

[% INCLUDE footer %]

============================================================
Header contains…

[% title %]

============================================================
Footer contains …

© Copyright 2007 Arthur Dent

============================================================

Then this is the output sent to STDOUT which can be redirected.

$ tpage example.html

This is an HTML example

Some Interesting Links

© Copyright 2007 Arthur Dent

============================================================

Then again maybe it is because it is March!


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK!! :@

You act on my advice at your own risk!


#3

Thank you for taking the time to answer something I should’ve been able to figure out on my own. I’ve actually purchased a book and I’m just trying to grock everything. Thanks again!