Learning XSL

Urban Planet urbanplanet.manticore at gmail.com
Fri Oct 5 21:26:45 BST 2018

Thank you very much for your tips.  We'll try to follow those
indications and report you with the results!

El vie., 5 oct. 2018 a las 13:32, Robby Stephenson (<robby at periapsis.org>)

> On Thu, Oct 4, 2018 at 12:39 PM Urban Planet
> <urbanplanet.manticore at gmail.com> wrote:
> >
> > As we like the Album template more than the others, we thought that we
> could apply that template for Books.  The system message told us not, but
> we change the type of collection to '4'  in the tellico xml file that is
> inside of the .tc
> > Then, we could view the book entries with the album template, but
> without the nice functionality to be able to see each entry with Author +
> Title + Year.
> >
> > Well, we thought this was due that the internal name of the field shown
> in the bar were "artist" and not "author".   Quickly we changed that
> internal name in the xml file ("author" to "artist").
> > But this means that if we want to modify the template, we must learn
> XSL, isn't it?
> Yes, modifying the XSL template is the easiest to do what you want,
> and shouldn't be too hard in this case. Copy and rename the Album.xsl
> file into your $HOME/.local/share/tellico/entry-templates folder. You
> can create that path if it doesn't already exist.
> Then, remove the restriction to be music collections only by deleting
> these lines:
> <xsl:template match="tc:collection[@type!=4]">
>  <h1><i18n>This template is meant for music collections only.</i18n></h1>
> </xsl:template>
> And changing the next line from
> <xsl:template match="tc:collection[@type=4]">
> to
> <xsl:template match="tc:collection">
> which essentially allow the template to apply to any collection type.
> Then do a search/replace for artist to author and see how well that works.
> Robby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/tellico-users/attachments/20181005/74f19b25/attachment.html>

More information about the tellico-users mailing list