[pmwiki-users] EasyGallery improvements - photo name

Pico pmwiki at ben-amotz.com
Wed Jul 19 20:03:03 CDT 2006


Martin Fick wrote:
> 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.

or, sticking with the available features included in the core:

  6) Use the existing title directive and page variable

  7) Use the existing description directive and page variable

  8) Include a designated portion of the page based on location (first 
line) or anchors

  9) Provide a caption with the thumbnail markup and allow the caption 
to be included with the thumbnail

Pico




More information about the pmwiki-users mailing list