Chillax86 Posted February 21, 2017 Share Posted February 21, 2017 (edited) Hi, I would like to know how to grab the 'meta_title' variable from a cms page/controller from within a module. Is there an easy way to do this without modifying the core code. Even if it means grabbing the id of the cms page being displayed and rebuilding the variable from the database as I then want to assign it to a smarty variable. Any help would be appreciated. Edited February 21, 2017 by Chillax86 (see edit history) Link to comment Share on other sites More sharing options...
JeredBolton Posted February 24, 2017 Share Posted February 24, 2017 If you know the ID of the CMS page then you can create a CMS object and get the meta_title from it, for example: $cms = new CMS($id); $this->context->smarty->assign('metaTitle', $cms->meta_title); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now