a must have Joomla code snippet

As a programmer I don’t have a good memories that’s why I have to read this Joomla code snippet when creating or updating joomla templates

  1. get current (absolute) url:

  2. get article by article id:

  3. add js file to head of the template:

  4. render module from template:

  5. get active user id:

  6. fix global $mainframe variable:

  7. get one record from db:

  8. set page title:

  9. detect whether in front page:

  10. get component name from joomla template index.php 

  11. get view name from joomla template index.php 

  12. get article id from joomla template index.php 

If you have some nice code snippets please share with us and I will update this list, later.

Leave a Comment

Your email address will not be published. Required fields are marked *