Skip to content

Instantly share code, notes, and snippets.

@strsar
Created January 30, 2017 17:36
Show Gist options
  • Save strsar/859da5bccab0abe7ce65ed9474a5a8a4 to your computer and use it in GitHub Desktop.
Save strsar/859da5bccab0abe7ce65ed9474a5a8a4 to your computer and use it in GitHub Desktop.
[Joomla!] - Load article by ID and register new set of params
<?php
// Load article
$id = 0;
$article = JTable::getInstance('content');
$article->load($id);
// Register new set of params
$item = $article;
$new_params = new JRegistry();
$new_params->loadString($item->params);
$var = $new_params->get('var');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment