Resources » Chunks

Chunk Resources

Chunks are blocks of HTML. This way you can write whole blocks of HTML code without cluttering up your templates with HTML you'd rather keep separate. Using the multiple pass processing, you can decide which Chunks should be included in the page using snippets. They can only contain HTML unless embedded PHP has been enabled within the Etomite configuration panel, in which case PHP can be intermingled within the HTML markup.

Chunks are also useful for storing blocks of HTML that you want to include in a snippet. This allows customisation of a snippet's presentation  without having to modify the snippet code, allowing snippet users (rather than authors) more scope for modifying the output to their needs.

Of course HTML can also contain javascript, so you can store your javascript in a chunk too. Much easier than trying to write a piece of javascript in the middle of a piece of PHP code, and making sure all your quotes correctly match and have the effect you want. (It also allows you to include the javascript while developing and testing, and then move the actual script to an include once it all works.)

You can read more about Chunks on the documentation site.