Re: CampaignHistory in outputsheet


Andrew Maitland
 

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

       
            <@loop from=0 to=pcvar('count("CAMPAIGNHISTORY")-1') ; campaignhistory , campaignhistory_has_next>   
           
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.CAMPAIGN')}
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.ADVENTURE')}
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.PARTY')}
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.DATE')}
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.XP')}
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.GM')}
                ${pcstring('CAMPAIGNHISTORY.VISIBLE.${campaignhistory}.TEXT')}
           
               
       

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


On 8/26/2018 4:34 PM, sidious@... [pcgen] wrote:
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.


Join ArchivedPCGenYahoo@pcgen.groups.io to automatically receive all group messages.