smcculloch posted on December 18, 2006 15:48
"Property Agent" has an extended version of "templates" available in "News Articles".
Previously, templates only allowed you to customize layout, but the extended functionality available in Property Agent allows you to do much more, here is an excerpt from the "Template Guide" (available here).
What is a Template?
The main requirement for the design of “Property Agent” was a module that could be
used to list “Real Estate Properties”. While this may sound trivial, we encountered a
number of issues.
Issue 1: What is a “Property”?
When designing the database to represent a property, it was becoming quite clear that
a definition for a “Real Estate Property” varied from country to country and business
to business.
We had no complete list of fields that could be used to describe a property that would
meet the majority of people’s needs. Even if we did, it would be a little too complex.
Issue 2: What is the best “Layout”?
There are two issues with layout:-
- How to blend in with an existing site’s skin?
- How to visually turn off features that a site would not need?
While the first could probably be achieved by only using standard CSS classes
provided within DotNetNuke®. The second would require a number of configurable
switches built into the module.
The Solution
After investigating 3rd party solutions, we found a solution to both our problems.
We would allow a super user to do the following:-
- Define custom fields that represent a property.
- Change layout via the use of customized tokens*
Change layout structure by turning off features
* ([Tokens] are placeholders for dynamic content)
Through designing this solution, the module became more then just another “Real
Estate” module. It became a module that you could potentially list anything!
To further extend the idea, we abstracted these three features (Custom Fields, Layout
Files and Layout Settings) and wrapped them in a distributable package (Template)
that could be shared between sites.
Furthermore, they would function very similar to “Modules”:-
- Only super users can add (install), edit and delete a Template.
- A template can be marked “Premium”, so they can be restricted for use on a
subset of portals.
- A template can be installed by a super user.
- A template can be uninstalled by a super user.
- After changes have been made to a template, it can be exported to a zip file (for sharing with other sites).
You can read more about how they work in the Template Guide.