I am researching the API commands for CMSMS and found a method called Load() which, as far as I can tell, allows the user to load in content taking the id of the page. I'm hoping to use this method to pull in content from sub-pages within a main page.
Example:
The page "Recent Work" is in my navigation menu, and this page has two sub pages - let's call them Work Page 1 and Work Page 2. Currently the Recent Work page is blank but I want to incorporate smarty tags to pull in the titles and maybe a small thumbnail from both pages Work Page 1 and Work Page 2.
I tried implementing $content_obj->Load(id) } (where "id" is the content_id of the sub page) but this does not work as I think I'm calling it from the wrong object. If anyone knows more details about this or maybe a better method to use, please let me know! This would help me immensely.
Regards
Michael
Using Load() to pull in the content of another page [solved]
Using Load() to pull in the content of another page [solved]
Last edited by memerson on Fri Mar 27, 2009 12:43 pm, edited 1 time in total.
Re: Using Load() to pull in the content of another page
to pull in the titles and maybe a small thumbnail from both pagesmemerson wrote: The page "Recent Work" is in my navigation menu, and this page has two sub pages - let's call them Work Page 1 and Work Page 2. Currently the Recent Work page is blank but I want to incorporate smarty tags to pull in the titles and maybe a small thumbnail from both pages Work Page 1 and Work Page 2.
Because you not set image/thumbnail in these page and use Menumanager for diplay them
Alby
Re: Using Load() to pull in the content of another page
To get the data from another page in another page, you can use the "Internal Pagel Link" content-type.
Ronny
Ronny
Re: Using Load() to pull in the content of another page
Thanks for your responses, but I just discovered a module called CGSimpleSmarty which allows me to pull in child content from a root menu item:
..within the linked template.
Code: Select all
<h3><a href="/{$child.alias}/">{$cgsimple->get_page_title($child.alias)}</a></h3>
<img src="uploads/images/{$cgsimple->get_page_content($child.alias, 'image')}" />
Re: Using Load() to pull in the content of another page
done, sorrymark wrote: Then please put [solved] in the subject line of first post...
