Hello, I have some logic in a template model class that I would like to execute only the first time the model class is executed for a page.
My first thought was to check the creation and modification dates, but since a page is usually named after being created, but before it is opened (which is when the model class is executed), this is not failsafe. Is there a best practice way to know for sure whether a model class is being executed for the first time for a page? A failsafe method I can think of is checking for some marker property: only run the first time logic when the marker property is not set and set it if it is not set at the end of the execution. This method would probably work, but feels dirty, so I'm open to other suggestions. Thanks, Nils. ------------------------------------------------------------------------ VPRO phone: +31(0)356712911 e-mail: [email protected] web: www.vpro.nl ------------------------------------------------------------------------ ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
