You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sparks is a view library designed to solve two problems:
Fine grained cacheablity. Caching in CI is an all or nothing affair. Sparks gives you the ability to divide your PHP blocks into those that are cacheable and those that are not. For example: Many sites display "You are logged in as XXX" in teh top corner. This username must be regenerated for each view (from the session data), however the rest of the page may be cacheable.
Including views within views (parts). Also automatically wrap view files in "wrapper templates".
[b]Usage[/b]
Write your templates with the following syntax:
[code]
<?php echo('This block is cachable'); ?>
<$?php echo('This block is not cachable'); ?$>
[/code]
Thus, non-cacheable PHP blocks have an extra $ in the start and end tags.