[pmwiki-users] Images in another group

Patrick R. Michaud pmichaud at pobox.com
Thu Dec 1 08:19:12 CST 2005


On Thu, Dec 01, 2005 at 07:59:27AM -0600, Tegan Dowling wrote:
>    Also, this isn't the case with all wikis -
>    On PmWiki itself, Attach:GroupName/imagename.ext works (eg try
>    Attach:Test/clouds.jpg from  the PmWiki/Sandbox page).
> 
>    What makes the difference?

Attach:something/image.png means to use "image.png" that would be
attached to the page reached by [[something]].

So, since [[Test]] on pmwiki.org links to Test.Test, 
Attach:Test/clouds.jpg means to use the "clouds.jpg" file attached
to the Test.Test page.

However, since there's no XYZ.XYZ or XYZ.HomePage on pmwiki.org,
Attach:XYZ/image.png would refer to "image.png" attached to the XYZ
page in the current group (since [[XYZ]] refers to the XYZ page in the
current group).

>    On 12/1/05, DaveG <pmwiki at solidgone.com> wrote:
> 
>      That format doesn't appear to make much sense though. When refering to
>      an image in the same group, no page is required, so why is one required
>      outside the group? 

Technically, attachments are never to groups, only to pages.  It's
possible to have a group of pages share attachments, but the attachments
are still considered to be attached to the pages and not the group itself.

>      I presume we needed some mechanism to distinguish
>      between a group and a page -- could we not use something more obvious?
>      Possibly Attach:Group/image.ext and Attach:Group/file/image.ext?

Suppose I have a site organized with per-page attachments instead of
per-group attachments.  How should an author refer to an attachment
to page "XYZ" in the same group?  Well, if I were writing a link, I
would use [[XYZ]], so it makes sense that the attachment should be
Attach:XYZ/image.ext.  It *doesn't* make sense that I would have to
write the group name (i.e., Attach:Group/XYZ/image.ext) to access
an attachment of another page in the same group.

Also, Attach:Group/image.ext *does* work if the group has a start
page such as Group.Group or Group.HomePage (because in this instance
[[Group]] refers to a page in another group).

Pm

>      Patrick R. Michaud wrote:
>      > On Thu, Dec 01, 2005 at 12:52:38AM -0500, DaveG wrote:
>      >
>      >>That doesn't work in the case where I manually FTP files to the Upload
>      >>directory, place the files logically in an appropriate group, and have
>      a
>      >>single page outside that group refering to the image...
>      >
>      >
>      > Actually it does work.  There's not a requirement that the page
>      > actually exists in the other group, just that PmWiki has to be told
>      > that you're referring to a page in another group and not in the
>      > current one.
>      >
>      >   Attach:XYZ.FooBar/image.png  -- refers to image.png in the XYZ group
>      >                                   even if XYZ.FooBar doesn't exist
>      >
>      > Pm
>      >
>      >
>      >
>      >>Patrick R. Michaud wrote:
>      >>
>      >>>On Thu, Dec 01, 2005 at 12:04:54AM -0500, DaveG wrote:
>      >>>
>      >>>
>      >>>>How do you display images in another group? I've tried
>      >>>>Attach:group/image_name.ext, and pretty much every combination in
>      >>>>between to no avail. Images in the same group display fine
>      >>>>Attach:image_name.ext.
>      >>>
>      >>>
>      >>>You need to refer to a page within another group, not just the
>      >>>group itself.  (Some PmWiki sites organize attachments per-page and
>      >>>not per-group.)  Thus:
>      >>>
>      >>>   Attach:Group.SomePage/image_name.ext
>      >>>
>      >>>Pm
>      >>>
>      >>
>      >
> 
>      _______________________________________________
>      pmwiki-users mailing list
>      pmwiki-users at pmichaud.com
>      http://host.pmichaud.com/mailman/listinfo/pmwiki-users

> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://host.pmichaud.com/mailman/listinfo/pmwiki-users





More information about the pmwiki-users mailing list