[NBP web-reskin] Templating Improvement - Voices of Our
Readers(for Ethan or Edie)
Didomenico, Steven
steven.didomenico at fmr.com
Mon Aug 24 10:38:50 EDT 2009
Thanks Ethan, I'm all set.
-----Original Message-----
From: web-reskin-bounces at nbp.org [mailto:web-reskin-bounces at nbp.org] On
Behalf Of Ethan Rowe
Sent: Monday, August 24, 2009 10:28 AM
To: Discussions regarding the 2009 UI reskin of nbp.org
Subject: Re: [NBP web-reskin] Templating Improvement - Voices of Our
Readers(for Ethan or Edie)
swdidomenico at comcast.net wrote:
>
>
> Hi Ethan and Edie,
>
>
>
> When I navigate to Ways to Help > Voices of our Readers, the [tempate
header] and [tempate footer] code appear in the page for these urls:
>
>
>
> http://26.camp.nbp.temphost.net:9026/ic/nbp/support/voices.html
>
> http://28.camp.nbp.temphost.net:9028/ic/nbp/support/voices.html
>
> http://29.camp.nbp.temphost.net:9029/ic/nbp/support/voices.html
>
> http://30.camp.nbp.temphost.net:9030/ic/nbp/support/voices.html
>
> http://31.camp.nbp.temphost.net:9031/ic/nbp/support/voices.html
>
This is because I made a mistake; when I updated all those camps to
point to the new "reskin" repository and pulled in the code to provide
the [template] tag, I neglected to restart each camp's Interchange. The
code for usertags is loaded in at startup time, so introducing a new tag
necessitates a restart. I'm sorry that I seem to have forgotten to do
that in my mad dash to get them all updated.
In any case, it works properly for all of them now.
> It works in Camp32:
>
>
> http://32.camp.nbp.temphost.net:9032/ic/nbp/support/voices.html
>
>
>
> While I have you on the line, when it comes to creating "Templates" in
Interchange is there a set of commands to add a new Template to a
catalog? Better yet how does does [var HEAD] know where to get the HEAD
template from? I have been going through the Interchange documentation
but I have not found an answer.
Any files in the catalogs/nbp/templates/regions directory get loaded in
with a variable name matching the filename. So, from within your camp,
catalogs/nbp/templates/regions/HEAD corresponds to the HEAD template.
The only annoyance is that if you introduce a new template variable in
that directory, you'll need to restart Interchange for it to pick up the
new variable. You can do that from within your camp via:
re
("re" short for "restart")
> As I understand it we are switching from the ITL [var] tag to the
[template] usertag. Is this correct?
For this particular usage, yes. [template] in fact uses [var] under the
hood, after determining from the environment what templates to use.
> Also during our first conference call there was talk of a "Template
Engine" and a Database holding the location of the Template. Is this how
it works or did I misunderstand? I read the documentation available on
the ITL [var] tag - access local (catalog) and global Interchange
variables.
The "templates" are just Interchange "variables" that have a
layout/presentation purpose (you can use variables for any number of
reasons, of which layout/presentation are among the more frequent
examples). As described above, IC loads all files from
catalogs/nbp/templates/regions into memory. It's not really a template
"database", it's more that the directory mentioned acts like the source
for some of these template variables. That's all.
> In order to gain some experience, I copied a template
catalogs/npb/templates/regions/SUPPORT_TEMPLATE_TOP and named it
SUPPORT_TEMPLATE_TOP_STEVE. Then I modified index.html to use [var
SUPPORT_TEMPLATE_TOP_STEVE]. As you might have guessed, nothing
happened, it did not find the template. So I take it there is a command
or something to add the template to the catalog.
Just the aforementioned restart. :)
Thanks.
--
Ethan Rowe
End Point Corporation
ethan at endpoint.com
_______________________________________________
Web-reskin mailing list
Web-reskin at nbp.org
http://www.nbp.org/mailman/listinfo/web-reskin
More information about the Web-reskin
mailing list