Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@dotMastaz
Last active August 29, 2015 14:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotMastaz/b75d1f6bfbaa37d2cf3f to your computer and use it in GitHub Desktop.
Save dotMastaz/b75d1f6bfbaa37d2cf3f to your computer and use it in GitHub Desktop.
/* example 1 */
/* In controller */
global $cookie;
global $smarty;
$cms = new CMS(1, intval($cookie->id_lang));
if (Validate::isLoadedObject($cms))
$smarty->assign('content', $cms->content);
/* In .tpl */
{$content}
/* /example 1 */
/* example 2 */
/* In controller */
$my_cms_content = new CMS(CMS_ID, LANGUAGE_ID); $this->smarty->assign(array( 'my_cms_content' => $my_cms_content));
/* In .tpl */
{$my_cms_content->content}
/* /example 2 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment