Item types should be able to be called in XSLT
Created attachment 163488 [details] [review] Bug 36366: Itemtype can be used in XSLT Sponsored-by: Catalyst IT
Wainui, Can we get a test plan?
Created attachment 163763 [details] [review] Bug 36366: Itemtype can be used in XSLT Test plan: - Apply patch - Go to one of the XSLT files e.g. MARC21slim2OPACResults.xsl - Use $itemtype defined in C4/XSLT.pm e.g. copy how $OPACItemLocation is used in MARC21slim2OPACResults.xsl - See if the XSLT changes worked e.g. go to search results and see if itemtype is there Sponsored-by: Catalyst IT
Created attachment 163784 [details] [review] Bug 36366: Itemtype can be used in XSLT Test plan: - Apply patch - Go to one of the XSLT files e.g. MARC21slim2OPACResults.xsl - Use $itemtype defined in C4/XSLT.pm e.g. copy how $OPACItemLocation is used in MARC21slim2OPACResults.xsl - See if the XSLT changes worked e.g. go to search results and see if itemtype is there Sponsored-by: Catalyst IT Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
I think this should match the format of other information: my $itemtype = C4::Koha::xml_escape($item->effective_itemtype && exists $itemtypes->{$item->effective_itemtype} ? $itemtypes->{$item->effective_itemtype} : $item->effective_itemtype); Other wise we end up with undef when the effective itemtype is not an official itemtype, and I think we should still display the type code in that case. Also, we are xml escaping other values, so should on this one too