Based on nicebooks/isbn
, this tiny package provides two Twig filters such that ISBNs can be formatted simply.
Just run composer require nicohaase/twig-isbn-formatter
formatIsbn
will add dashes where neccessarytoIsbn13
will provide a ISBN-13 out of any valid (ie. ISBN-10 or ISBN-13) input
{{"9783411040162"|formatIsbn}}
will output978-3-411-04016-2