Is it possible to print all pages

General project discussion. NOT for help questions.
Post Reply
User avatar
fearmydesign
Power Poster
Power Poster
Posts: 363
Joined: Sun Feb 28, 2010 10:54 pm

Is it possible to print all pages

Post 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.
Rod
"Be careful who you step on your way up; because you never know who you'll meet on your way down!" - or something like that.
Wishbone
Power Poster
Power Poster
Posts: 1368
Joined: Tue Dec 23, 2008 8:39 pm

Re: Is it possible to print all pages

Post 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.
Post Reply

Return to “General Discussion”