renegadeok Posted July 24, 2013 Share Posted July 24, 2013 Hi! I would like to know if there's a way to have on a CMS subpage a list of the other subpages from the same parent. Pretty much the same as when you click on a CMS page with children. Thanks! Link to comment Share on other sites More sharing options...
NemoPS Posted July 24, 2013 Share Posted July 24, 2013 Hi! I suggest you do this in the cms controller, but you can as well try to retrieve those pages in the tpl using {CMS::getCMSPages($cookie->id_lang, $cms->id_cms_category)} Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 Nemo1, it is necessary to do forach loop on this? i suppose so Link to comment Share on other sites More sharing options...
NemoPS Posted July 24, 2013 Share Posted July 24, 2013 Iin a cms page? nope, there is only one cms object Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 i mean that {CMS::getCMSPages($cookie->id_lang, $cms->id_cms_category)} is an array with elements in this case foreach loop is necessary {foreach from=CMS::getCMSPages($cookie->id_lang, $cms->id_cms_category) item=cat} this is {$cat.name} {/foreach} hope i understood everything here, in this thread well if no, please correct me Link to comment Share on other sites More sharing options...
renegadeok Posted July 24, 2013 Author Share Posted July 24, 2013 Thanks for being so prompt. It needs a loop indeed, but {$cat.name} returns empty; probably it's not a property name. I'm trying to figure out which one I should use (of course, if I manage to list my object). Again, thanks to both vekia and Nemo1 Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 hey, just use {$car|print_r} in the foreach loop and you will see all available variables there Link to comment Share on other sites More sharing options...
renegadeok Posted July 24, 2013 Author Share Posted July 24, 2013 Thanks! Worked like a charm. Link to comment Share on other sites More sharing options...
vekia Posted July 24, 2013 Share Posted July 24, 2013 thanks for confirmation now im going to mark thread as [solved] best regards Link to comment Share on other sites More sharing options...
renegadeok Posted July 24, 2013 Author Share Posted July 24, 2013 To you, too. Close it. 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