Page 1 of 1
Is it possible to print all pages
Posted: Mon Dec 13, 2010 5:17 pm
by fearmydesign
Hi, is there an easy way to print out all of the web pages inside a cmsms installation? I couldn't find anything, and i know it's a random request, but one of my clients wants me to print out all the pages and review them one by one!
Hope someone can help, thank you in advance.
Re: Is it possible to print all pages
Posted: Mon Dec 13, 2010 5:53 pm
by Wishbone
I have a UDT that will dump all your pages' content into one page.
Create a UDT called content_dump
Code: Select all
global $gCms;
$cntnt = $gCms->getContentOperations();
foreach ($cntnt->GetAllContent() as $page) {
echo '<h1>' . $page->mName . '</h1>';
$page_data = $cntnt->LoadContentFromAlias($page->mAlias);
echo($page_data->mProperties->mPropertyValues['content_en']);
echo "<br><br>";
}
Create a page called 'test' or whatever, and put {content_dump} in it. This page will contain the content of all pages on your site.