Get Contents of Page in UDT [SOLVED]

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
emorling
Forum Members
Forum Members
Posts: 45
Joined: Tue Oct 26, 2010 6:16 am

Get Contents of Page in UDT [SOLVED]

Post by emorling »

How do I get the contents of any page in an UDT? Thx
Last edited by emorling on Fri Dec 03, 2010 7:07 am, edited 1 time in total.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Get Contents of Page in UDT

Post by Wishbone »

Code: Select all

global $gCms;
$cntops = $gCms->getContentOperations();
$content = $cntops->LoadContentFromAlias('your-page-alias-here');
echo($content->Show());
Last edited by Wishbone on Fri Dec 03, 2010 5:29 am, edited 1 time in total.
emorling
Forum Members
Forum Members
Posts: 45
Joined: Tue Oct 26, 2010 6:16 am

Re: Get Contents of Page in UDT

Post by emorling »

Thanks!
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Get Contents of Page in UDT [SOLVED]

Post by Wishbone »

Interestingly, this doesn't seem to work for default content... The property value 'content_en' seems to not exist on any default page... Not sure why.
Post Reply

Return to “Developers Discussion”