https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39296

--- Comment #8 from Jonathan Druart <[email protected]> ---
Created attachment 188347
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188347&action=edit
Bug 39296: [POC] Send objects to the templates

[% SET all_subjects = {} %]
[% FOREACH d IN data %]
    [% SET record= d.biblio.metadata.record %]
    [% SET fields = record.field('6..') %]
    [% FOREACH field IN fields %]
        [% tmp = field.delete_subfield('code','9') %]
        [% SET subject = field.as_string() %]
        [% IF ( all_subjects.$subject ) %]
            [% all_subjects.$subject = all_subjects.$subject + 1 %]
        [% ELSE %]
            [% all_subjects.$subject = 1 %]
        [% END %]
    [% END %]
[% END %]
<table>
<tr><th>Subject</th><th>Count</th></tr>
[% FOREACH key IN all_subjects.nsort.reverse %]
<tr><td>[% key %]</td><td>[% all_subjects.$key %]</td></tr>
[% END %]
</table>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to