sandrods / odf-report

Generates ODF files, given a template (.odt) and data, replacing tags

Home Page:http://sandrods.github.com/odf-report

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Placeholder problem

henriquekraemer opened this issue · comments

Sometimes the placeholders stop working without a specific reason, not replacing the variables. The template was build with Writer v4.4.2.2

The strange thing is that if I create a template from scratch going through the same placeholder, it works...

It usually happens when you edit the placeholder inside OOficce/LOficce.
Sometimes it messes up the styles and includes markup that prevents odf-report from identifying the placeholder.

The golden rule is: NEVER edit the placeholders. If you want to change one, delete it an write again, including the []

Hope that helps

commented

I spend a lot of time figuring out why some placeholders where not working, and I finally found this note (may I suggest to put it in the README?)

Is this golden rule really applicable?
Imagine I have the perfect template; then I need to change it a bit (editing placeholders, too): do I have to open a new file and rewrite the template from scratch? I cannot even cut-paste?
thanks

Yes, the golden rule is really applicable, BUT it´s about the PLACEHOLDER, not the whole template. If you have, say, [USER] in your template and you want to change to [USERNAME], you should not edit and type NAME.
Delete the PLACEHOLDER [USER] and type [USERNAME].

HTH