fatwire

Fatwire CSElement vs. Template


In Fatwire, there are two asset types which contain code: CSElement and Template. From what I've found, Template is a combination of a CSElement and a SiteEntry. Currently, I use Templates as a wrapper for a set of CSElements, but I'm not totally sure this is the best way to structure my sites.

Is there any rule of thumb as to when a Template or CSElement is preferable over the other>? Or does it not really matter?


Solution

  • The conversion is to use minimum logic part in templates and all cs elements should be called from the template. The logic should be coded in CSElements.

    For example, if a page is rendered using one template. The navigation part will be done using one CSElement, Header logic will be in one template , logic to load body will be in another CSElement. all these CSelements will be called from the template. In short all these pagelets are rendered using CSElemtents. But it is called from Template.

    The only plus point in template is that you can associate template with any asset. In all other cases CSElements are used.