"John P . Looney" wrote:

>  Bascically, I want to have access to a function like
> get_attachment_from_name(), which would take the name of an attachment,
> and look through a style's or a page's attachments for it, and show it
> (I'm just using attachments for gifs in styles at the moment).

First fetch the object that it's attached to, like:

$page = mgd_get_page(1);

Then, depending on what you want to do with the attachment:

$cursor = $page->listattachments();

or

$filehandle = $page->openattachment("name");

or

$page->serveattachment("name");

in general, the attachment methods will do exactly the same as the
attachment
functions, but with the first parameter being a name instead of an ID.

Emile

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to