Forum OpenACS Development: Re: HTML quoting in the templating system

Collapse
Posted by Jim Lynch on
I'd like to suggest a different place to put the quoting/not-quoting attribute...

ad_page_contract -properties {
    navbar:onevalue,noquote
    keyrows:multirow
} {
}

Why, you may ask? Answer: since it is the goal of the templating system to separate the graphic designer from the programmer, why give me something programmatic to explain to the graphic designer?

On the other hand, this could be done in -both- places (.tcl -and- .adp), because there is a translation process that happens before the page is rendered. Since this is true, the translation process could be altered to insert quoting based on what it's told in the page contract.

For multirow data sources, any desired lack of quoting would be specified on a per-column basis when the multirow data structure is defined. For multirows read from the database, you could have a switch to the db_multirow command, that might look like "-no_quote_on_columns {column1, column3}".

If you offer the choice of where the quoting attribute is set (in the .tcl, or in the .adp), then project managers can explain the quoting to the designers if and only if they want to.

-Jim