Show_if vs conditional keywords


(Chris Horikx) #1

Hi Guys,

Just about to start on a new design parse file. For a long time I’ve been using the %globals_metadata…^eq:…% keywords to hide/show page areas by metadata switch. This time I’m interested in using the %begin_… keywords. The %begin keywords mimic a simple portion of the show_if functionality. I am wondering which is more efficient. The show_if functionality contains the ability to cache the design area but might come with more weight of the customisations than perhaps a more simple %begin_ statement.


(Bart Banda) #2

I guess it depends on what content you are conditioanlly showing/hiding.

A common practice in our best practices is to nest in a standard page and have a bunch of begin/else/end keywords in that. You can then cache the nested area for the standard page.

The rule of thumb to follow as well is to keep your parse file as light on customisations as possible, so the less show if design areas you have the better.