Hello,

I want to provide the ability to add themes to my application. To do so, 
I do:
    unshift @{$self->renderer->paths}, $theme.'/templates'
        if -d $theme.'/templates';
It works perfectly well: if a template exists in the theme/template 
directory, it will be used instead of the default one. OK.

If I do the same for static files:
    unshift @{$self->static->paths}, $theme.'/public'
        if -d $theme.'/public';

The static files are served from the default directory (public), and 
it's only if the file doesn't exist in the default directory that the 
theme/public directory is used.
I tried to empty @{$self->static->paths} before unshifting 
$theme.'/public' in it but the default files are still used (I checked, 
only theme/public is in the static paths array).

Am I doing something wrong or is this a bug?

I'm using Mojolicious 6.22, and the behavior is the same with morbo and 
hypnotoad.

Thank you for any advice.
-- 
Luc
https://fiat-tux.fr/
Internet n'est pas compliqué, Internet est ce que vous en faites.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to