Getting the Template Name

I sometimes need more control over the styling than conventional ID’s and classes can provide; which will also protect against user input and be dynamic. I like to use a combination of the root alias, parent alias (if not the same as root) and the template name. The reason for this is so I can have full control over what gets styled and how even if the user doesn’t include that...

Get the Last Modified Date

I recently had to acquire the last modified date of a parents child pages. Now usually if you are on the page in question you would use something like this: {modified_date format="%A %d-%b-%y %T %Z"} But that doesn’t get pulled through when using something like CGSimpleSmarty to get child pages.

Convert an Uploaded PDF to Thumbnail

I recently had a client who had a large number of PDFs which they wanted linked to specific case studies. Now usually you would just put a textual link wherever they wanted to put it but my client also wanted these links to display the first page of their PDF in a graphical format. That request gives me three options: Screenshot the first page of each PDF and convert it to the right...