New compile-time tag: <$subdoccount>

I was fiddling with a comic script template shared by someone who is published by Vertigo, and they noted that the beginning of each “comic page” document should start with how many panels there are on that script page. I also began fiddling with it, making descriptive information for a comic page into the parent, and each panel into a separate document.

One essential bit of info on this template that cannot be automated is to note how many panels are to end up on the comic page; that has be counted and entered by hand. But what if there were a <$subdoccount> tag that would fill in the number of children of that document? It’s available in the binder if you enable that feature, so the number of subdocuments should be available to the compile process. A companion value might be <$subdoconelevelcount> : a count of the immediate sub-documents only.

Added for 2.5: <$subDocCount> counts immediate children, and <$descendantCount> counts children and children of children.
All the best,

Awesome! Now I just have to figure out how to write in this scriptwriting mode… and decide which story idea fits the medium well enough. You know, the easy stuff, once you have a $subDocCount tag. :stuck_out_tongue:

Hey, did the <$subDocCount> variable get removed for some reason? I was playing with a template where it worked at one point (in a beta version, maybe?), but it doesn’t now.