IsPopularOnline is a Web 2.0 Community Website Helping Amateur Marketers Get Multiple High-Ranking Search Engine Listings and Tons of Traffic. List your URL today! Its your webpage. Editable Anytime. We do the SEO to make Google LOVE it. Free! read more
In this PHP example Smarty code of collection.php the function is passed a collection_id and page number and displays only items belonging to a the collection matching the collection_id...
Collections are paged.
All database collections use the same Smarty template so each page needs to be identified uniquely identified so that the appropriate cached page can retrieved by Smarty templates. This is done by creating a cache identifier from the collection_id and page variables.
When an HTML webpage is coded with Smarty and then accessed, a cache identifier is generated and the cache is checked to see if there is an existing cached page.
If the cached Smarty page does exist, the HTML version of the Smarty page is returned from the cache, if not then the page needs to generated and displayed. Smarty HTML WebPage generation may involve template complication and database access and processing, this is avoided if the page exists in cache.
The cached Smarty pages expire automatically after after 1 hour (can be set) or can be cleared manually.
This second type of Smarty caching (Smarty content caching) requires some thought as well as an understanding of the data to be able to successfully implement.
Inputs are required to create each page. Inputs to Smarty are used to generate a cache identifier and identify the Cached Smarty Page... Click on the article title to see the example Smarty code.
comments