sub-directories in /plugins but not /templates

Creating and modifying plugins.
Post Reply
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

sub-directories in /plugins but not /templates

Post by gwilsonmail »

The plugin mechanism supports sub-directories - That is Serendipity finds plugins you have in a sub-directory of the plugins folder. I find that very useful for managing the additional plugins from CVS and for experimental plugins from others.

Templates are now supported by Serendipity but sub-directories are not supported.

Is this by design or an omission?
gw
wesley
Regular
Posts: 197
Joined: Sun Jul 10, 2005 11:15 am
Contact:

Post by wesley »

The plugins... they're searched under any subfolder within 'plugins'. Yes.

The templates... they're searched within 'templates' and each templates
are assumed to be contained in a subfolder of 'templates'.

So both are effectively stored in subfolders of the respective parent
folders. Serendipity finds plugins in a subfolder of plugins. It also finds
templates in a subfolder of templates. So in this sense, of course s9y
supports subfolders for templates.

But this is obvious.

Therefore, I'm assuming that you didn't word your first sentence correctly
and meant that you attempted to put a plugin within a subfolder OF a
subfolder within the plugins folder and found that it still worked?

e.g. usually the plugins reside in this sort of folder...

/plugins/serendipity_event_entrypaging

but you've made a subfolder in plugins and put plugins IN that?

/plugins/experimental/serendipity_event_entrypaging

like so? I haven't tried it because I'm away from my server at the moment
but if this is what you meant, please do tell.
I make s9y plugins, too.
My s9y blog depends on them. :)
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

/plugins/experimental/serendipity_event_entrypaging
This certainly works for plugins. It's even documented as such.

but a similar structure for a template does not work
gw
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

Doesnt 0.9 support subfolders for templates, if you use different templates for different categories?
from: http://blog.s9y.org/archives/50-Maintai ... -blog.html

You can not only choose a different maintemplate ("blue", "kubrick", "moz-modern" etc.) - you can even select a sub-template of your template. Like "kubrick/category1", "kubrick/category2" and so forth. The directory structure of a "sub-template" is the same as a completely different template. So you have all options to fully tweak your templates dependant on the selected category.
I havent tried this yet.
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

Doesnt 0.9 support subfolders for templates, if you use different templates for different categories?
yes allowing you to display each category with a different template.

i was simply trying to organize the folder structure on the server.
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Thanks for this hin; in fact it was not possible to have subdirectories.

I've just committed a patch to 0.9 that allows this. BTW, Spartacus can also maintain your templates since 0.9!

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Col. Kurtz
Regular
Posts: 450
Joined: Thu May 26, 2005 10:43 am
Location: Bonn, Germany
Contact:

Post by Col. Kurtz »

garvinhicking wrote:BTW, Spartacus can also maintain your templates since 0.9!
And I´m loving it! Supersize please.
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

Thanks for the fix Garvin.

I note the following in the 0.9 changelog
Version 0.9 ()
------------------------------------------------------------------------

* Make template directory allow to contain subdirectories with more
templates. This allows you to symbolically link the "additional_themes"
CVS directory within your templates path, just like you can do
with the "additional_plugins" directory already (garvinhicking)
I tried to link an additional_plugins directory using a windows shortcut to a local folder with the latest additional_plugins from CVS. It doesn't work. How do you "symbolically link the "additional_themes" correctly. Being able to do this would be of great help.
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

I tried it on my linux system; I just have my "templates/" directory, and put "templates/additional_themes" inside there. So I have:

templates/default
templates/kubrick
...
templates/additional_themes/perun_blue
templates/additional_themes/dreisechzig
...

And this works on my latest 0.9...did you fetch the recent nightly where the docs/NEWS contains the note about the new functionality?

I don't really know how this works on windows; does the plugin linking work with the same method?

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
gwilsonmail
Regular
Posts: 146
Joined: Tue Jul 12, 2005 9:12 pm
Location: Ottawa, Canada
Contact:

Post by gwilsonmail »

Neither plugins nor templates works using short cuts in windows.
i do have the latest build via SVN.
gw
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Yes, I thought so that it wouldn'T work on Windows.

Maybe if using true NTFS links it works. But I don't know how to build them.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply