Hi,
I fixed this up for the 6.07 series. Feel free to replicate the effort here for your own use, or download the latest version of pcgen to take advantage of the new code.
pdf - xml.ftl
<campaign_histories>
<@loop from=0 to=pcvar('count("CAMPAIGNHISTORY")-1') ; campaignhistory , campaignhistory_has_next>
<campaign_history>
<campaign>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.CAMPAIGN')}</campaign>
<adventure>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.ADVENTURE')}</adventure>
<party>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.PARTY')}</party>
<date>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.DATE')}</date>
<xp>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.XP')}</xp>
<gm>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.GM')}</gm>
<text>${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.TEXT')}</text>
</campaign_history>
</@loop>
</campaign_histories>
I don't know if I did the same treatment for the html pages. But the proof of concept is there, and you can use the freemarker code.
Cheers,
Andrew
My first post got eaten it looks like.
Anyway, trying to output campaign history to html.
I can manually do so by putting the individual entires in like:
${pcstring('CAMPAIGNHISTORY.VISIBLE.0.TEXT')}
...all fine and good.
However, the problem occurs if I want to create a loop using the count of campaign history entires. Looks like it would work in a .LST file (http://pcgen.org/autobuilds/pcgen-docs/listfilepages/globalfilestagpages/globalfilesformulas.html#count), but the count token doesn't seem to work for outputsheets. I tried the following:
pcvar('COUNT[CAMPAIGNHISTORY.VISIBLE]')pcvar('COUNT[CAMPAIGNHISTORY]')
and
pcvar('COUNT[CLASSES]')
...as a "control"
The last one (count of claseses) works, the other two always return zero. That means I can't use them to create a loop to output all of my campaign history entries.
FYI, running 6.0.6
Thanks.
Posted by: Andrew Maitland <drew0500@yahoo.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
No comments:
Post a Comment