[Kde-imaging] kipi htmlexport
Aurelien Gateau
aurelien.gateau at free.fr
Sun Jan 7 00:23:48 CET 2007
Le Samedi 6 Janvier 2007 03:24, Marcelo Anelli Colla a écrit :
> gallery.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <collections>
> <cssnombre>style001.css</cssnombre>
> <logoimage>site.jpg</logoimage>
> <homebutton>homees.jpg</homebutton>
> <albumbutton>album.gif</albumbutton>
> <firstbutton>firstes.gif</firstbutton>
> <previousbutton>previouses.gif</previousbutton>
> <nextbutton>nextes.gif</nextbutton>
> <lastbutton>lastes.gif</lastbutton>
> <gallbutton>galleryes.gif</gallbutton>
> <homepage>http://www.marceloanelli.com/fotos/index.html</homepage>
I would prefer to keep the XML file independent from the theme. Theme
parameters can be implemented the same way i18n text is implemented. To avoid
clashes, they should be prefixed with "theme_".
> the template file (part):
[snip]
> <xsl:variable name="cssnombre" select="/collections/cssnombre"/>
> <xsl:variable name="logoimage" select="/collections/logoimage"/>
> <xsl:variable name="homebutton" select="/collections/homebutton"/>
> <xsl:variable name="albumbutton" select="/collections/albumbutton"/>
> <xsl:variable name="firstbutton" select="/collections/firstbutton"/>
> <xsl:variable name="previousbutton" select="/collections/previousbutton"/>
> <xsl:variable name="nextbutton" select="/collections/nextbutton"/>
> <xsl:variable name="lastbutton" select="/collections/lastbutton"/>
> <xsl:variable name="gallbutton" select="/collections/gallbutton"/>
> <xsl:variable name="homepage" select="/collections/homepage"/>
[snip]
Using XSLT params you won't need this: just use $theme_paramName in your XSLT.
> The theme desktop file:
[snip]
> [Variables]
> cssnombre=style001.css
> logoimage=site.jpg
> homebutton=homees.jpg
> albumbutton=album.gif
> firstbutton=firstes.gif
> previousbutton>previouses.gif
> nextbutton=nextes.gif
> lastbutton=lastes.gif
> gallbutton=galleryes.gif
> homepage=http://www.marceloanelli.com/fotos/index.html
If we want to let the user alter the theme parameters, the definition should
be a bit more complex. Something like this:
----
[parameters]
list=columnCount,logo,cssFile
[parameter_columnCount]
title=Column Count
title[fr]=Nombre de colonnes
description=Number of thumbnails column
description[fr]=Nombre de colonnes de vignettes
type=int
default=4
[parameter_cssFile]
title=Variation
title[fr]=Variante
type=list
defaultValue=blue.css
item[0].value=blue.css
item[0].text=A blue variation
item[0].text[fr]=Une variante bleue
item[1].value=gray.css
item[1].text=All gray
item[1].text[fr]=Tout gris
[parameter_logo]
title=Logo
title[fr]=Logo
type=image
default=logo.png
----
This way the plugin could show the parameters as a property list. This can be
done, but it's quite a lot of work...
Aurélien
More information about the Kde-imaging
mailing list