Changing The "Number of Items" calculation

wildmanmatt

Joined: 2008-07-10
Posts: 21
Posted: Wed, 2008-11-26 13:33

I have changed the "Number of Images and Albums:" in my core ItemInfo.tpl to be:

{if !empty($showSize) && $item.canContainChildren && $item.childCount > 0}
<div class="size summary">
{g->text one="Number of Images: "
many="Number of Images: "
count=$item.childCount
arg1=$item.childCount}
{if $item.descendentCount > $item.childCount}
{g->text one="%d"
many="%d"
count=$item.descendentCount
arg1=$item.descendentCount}
{/if}
</div>
{/if}

How would I change the calculation of %d to give the total number of images contained in that album and any sub-albums contained within?

At the moment, I have some albums that only contain sub-albums which themselves contain images so some albums don't display a number for Number of Images, or display a number which is too low.

Any help would be much appreciated :)

Matt