[NBP web-reskin] Development Effort
Ethan Rowe
ethan at endpoint.com
Thu Aug 27 02:18:00 EDT 2009
Didomenico, Steven wrote:
> Hi Ethan,
>
> We are now at a point where we want to get an idea of the full
> development effort.
>
> Since the site makes use of the Interchange variable for reusable code,
> the templates, we are trying to figure out how many of these we will
> need. And are there any on the current site that have non-presentation
> logic in them that we can reuse.
>
> Would you happen to have any documentation on the current NBP Templates?
Nope, but I can probably give you enough to move forward without much
trouble.
As you've no doubt seen (and I believe we've already discussed a bit),
the various areas of the site have pairs of template variables. For
instance:
COMPANY_TEMPLATE_TOP
COMPANY_TEMPLATE_BOTTOM
These are the templates that the [template] tag I threw together is
designed to pull in based on the requested page.
The *_TEMPLATE_TOP variables are typically structured to:
* set a few session variables that indicate what the "area" of the site
is (a few pieces of logic here and there expect this)
* pull in a few standard other template variables for establishing the
layout, top page banner, search form, etc.
* set up the site-section-specific navigation links for the left column
* open the region of the document in which the page-specific content goes
The *_TEMPLATE_BOTTOM templates generally:
* pull in the top portion of the page footer region
* set the little blurb that shows in the white region of the footer region
* pull in the bottom portion of the page footer region, including
closing tags for the whole enclosing table, the HTML document, etc.
Variables/templates are pulled in via a few different means:
__VARIABLE_NAME__
@_VARIABLE_NAME_@
@@VARIABLE_NAME@@
[var VARIABLE_NAME]
The difference between these:
* "__" prefix/suffix is only for catalog-level variables
* "@_"/"_@" will look for the specified variable in the catalog first,
then at the global daemon level if not found
* "@@" prefix/suffix looks for the variable in the global space.
When pulled in with these prefixes, variables are substituted into the
buffer *before* all ITL tags are parsed.
The final use, [var VARIABLE_NAME], is simply an ITL tag that pulls the
variable in when the tag is interpolated. When pulling in a variable
from within another, we pretty much always use this method rathe rthan
the prefix method, because of some annoyances in how interpolation is done.
All the variables you're using in templating are catalog-level, so you
don't need to worry about the catalog-versus-global variable question.
So, if you look at the aforementioned COMPANY_TEMPLATE_TOP, you can see
that:
HEAD is pulled in;
TOP is pulled in;
The "who we are" section navigational links are listed;
ACCESSIBILITY_DOT is pulled in.
If you look at HEAD, you see that it:
* sets up the start of the HTML document
* determines the document's title using xsection_title and xpage_title
values
* pulls in the CUSTOM_CSS stuff
If you look at TOP, you see that it:
* opens the document body
* sets up the top banner area with links for "Highlights" and such
* pulls in TOP_NAV for top-right navigation stuff, the search form, etc.
And so on.
This isn't documentation so much as an explanation of the current state
and information on how to figure this stuff out. It's probably most
effective to take 15 minutes now that you have this background and see
how the different variables correspond to the different regions of the
general page design on interior pages.
Let me know if you have other questions. Thanks.
- Ethan
--
Ethan Rowe
End Point Corporation
ethan at endpoint.com
More information about the Web-reskin
mailing list