Hi all,
hoping someone would be kind enough to assist me here... would be much appreciated.
I currently use OemPro for my company newsletter and this comes with FCKEditor by defaukt, which is great.
Today i've been looking into the templates feature but have had no joy.
I opened up the fcktemplates.xml file and following the example, attempted to merge my code, however, for no reason that i can understand, i get an error when i try to access templates that reads "No HTML defined for template index 0. Please review the file fcktemplates.xml".
I took the original file and made a backup, then edited it to include my custom code.
My custom code alone is as follows:
<div> <b class="cnews_article_green"> <b class="cnews_article_green1"> <b></b></b> <b class="cnews_article_green2"> <b></b></b><b class="cnews_article_green3"></b> <b class="cnews_article_green4"></b> <b class="cnews_article_green5"></b></b> <div class="cnews_article_greenfg"> <table width="100%" border="0" cellspacing="3" cellpadding="2"> <tr> <td class="style15 style17">Insert Title Here</td> </tr> <tr> <td bgcolor="#FFFFFF" class="style2"><br /> Insert News Content Here <br /> <br /></td> </tr> </table> </div> <b class="cnews_article_green"> <b class="cnews_article_green5"></b> <b class="cnews_article_green4"></b> <b class="cnews_article_green3"></b> <b class="cnews_article_green2"><b></b></b> <b class="cnews_article_green1"><b></b></b></b> </div><br />
After editing the fcktemplates.xml file, here is what i have:
<?xml version="1.0" encoding="utf-8" ?> <!-- * FCKeditor - The text editor for internet * Copyright (C) 2003-2006 Frederico Caldeira Knabben * * Licensed under the terms of the GNU Lesser General Public License: * http://www.opensource.org/licenses/lgpl-license.php * * For further information visit: * http://www.fckeditor.net/ * * "Support Open Source software. What about a donation today?" * * File Name: fcktemplates.xml * This is the sample templates definitions file. It makes the "templates" * command completely customizable. * See FCKConfig.TemplatesXmlPath in the configuration file. * * File Authors: * Frederico Caldeira Knabben (fredck@fckeditor.net) --> <Templates imagesBasePath="fck_template/images/"> <Template title="Club News Article Blue" image="template1.gif"> <Description>Article holder in Blue</Description> <html> <![CDATA[ <div> <b class="cnews_article_green"> <b class="cnews_article_green1"> <b></b></b> <b class="cnews_article_green2"> <b></b></b><b class="cnews_article_green3"></b> <b class="cnews_article_green4"></b> <b class="cnews_article_green5"></b></b> <div class="cnews_article_greenfg"> <table width="100%" border="0" cellspacing="3" cellpadding="2"> <tr> <td class="style15 style17">Insert Title Here</td> </tr> <tr> <td bgcolor="#FFFFFF" class="style2"><br /> Insert News Content Here <br /> <br /></td> </tr> </table> </div> <b class="cnews_article_green"> <b class="cnews_article_green5"></b> <b class="cnews_article_green4"></b> <b class="cnews_article_green3"></b> <b class="cnews_article_green2"><b></b></b> <b class="cnews_article_green1"><b></b></b></b> </div><br /> ]]> </html></Template> </Templates>
Now, although the my custom code calls classes from a stylesheet that is not defined within the template file, this shouldn't make a difference and should mean i simply do not see the formatting that the classes would normally apply, right?
Any assistance with making this work would be much appreciated as i am in the process of moving our internal company newsletter over to the OemPro software, and in doing so, to make things very easy for our secretary, i plan to use the template feature as detailed above.
Thanks in advance,
Anthony.
Re: Help with Templates?
Note sure what caused it, but i started again, did the sdame thing but instead of striiping out the original 3 templates, i replaced the third with my own and it worked great.