[pmwiki-users] EasyGallery improvements - photo name

Martin Fick mogulguy at yahoo.com
Wed Jul 19 17:05:11 CDT 2006


More thought on Easy Gallery improvements:

There is a larger underlying problem with automating
the pagelists for galleries, and that is: getting the
name of the photo from the name of the page since a
pagelist returns the page name.  

Usually the name of the page starts with a capital,
but the name of the photo might be all lowercase. 
This is the scheme used in EasyGallery but a naming
scheme could easily be even worse.  The only simple
way around this is to make sure that your photo names
match (case included) your page names.  This is
difficult since pagenames have to start with a
capital.  If we do not bow to this restriction this
leaves us with the need to somehow extract the name of
the photo from its wiki page.  There are several
approaches that could be used here:

1) Define a page variable containing the photo name
using the Page Variable Extensions recipe.

2) Somehow get the name from attachlist?

3) Define a custom pagelist variable that will
translate the names from upper to lowercase for you
(if that is your simple naming scheme)

4) Use Page Variable Extensions to translate the names
from upper to lowercase for you  (again, if that is
your simple naming scheme)

5) I actually used a custom approach, I defined a
(:photo photoname.jpg:) markup which has several
features one of them being a naming piece, the name is
available in various markups which know how to look on
the page for the photo directive and extract the photo
name.


-Martin


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




More information about the pmwiki-users mailing list