Page 1 of 1

Re: dump all content in a Word document (or a text file)

Posted: Wed Jan 27, 2010 9:39 pm
by Wishbone
OK... I have a procedure for you to dump all your content into a single page so you can copy and paste into Word.

Create a User Defined Tag called "content_dump". Put the following in it:

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 "word".. Go to the options and turn off the menu so it doesn't change your menus. Put the following in this page.

Code: Select all

{content_dump}
here's my test: http://www.thefcff.com/?page=word

Now you can copy and paste it into a word document.

NOTE: This won't process any smarty you might have on a page. If you need news as well, that's another procedure.

Re: dump all content in a Word document (or a text file)

Posted: Thu Feb 11, 2010 11:47 am
by Charles Butcher
Wishbone, that's really nice. But Sven, couldn't you persuade a translator to work directly in CMSMS? You would have to duplicate your Dutch pages and put them somewhere hidden, but it would save a lot of work re-importing the content. Just a thought!

Re: dump all content in a Word document (or a text file)

Posted: Mon Feb 15, 2010 12:07 pm
by Charles Butcher
You would have to trust your translator, of course, and I know they use all kinds of Windows-based tools that probably tie into MS Word.

But I make a lot of my income from "polishing" translations, or material that's been written in English by non-native speakers, and I think it makes sense to reduce the number of times text is moved around.

One client asked me to edit all the copy on a website, which could have been a nightmare since there were hundreds of small files. But they gave me FTP access and I did it all in a text editor, editing one file at a time directly on the server, and it went very well.

If you added a style called "done", whose text was set to be hidden, maybe the translator could use this to "turn off" chunks of original text as soon as they'd been translated, yet without deleting anything.