Microsoft Content Management Server - Getting resource item guid from a gallery

This is Interesting: Free IT Magazines  
Home > Archive > Microsoft Content Management Server > October 2005 > Getting resource item guid from a gallery





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Getting resource item guid from a gallery
shmeian

2005-10-30, 5:50 pm

Hi there,

I'm wanting to make a 'photo summary' template which will show thumbnails of
full sized images in a number of individual 'photo' postings. These photo
postings will have an image placeholder populated by an image in the resource
gallery.

How do I get the path or guid of the image resource used in the image
placeholder?
I figure I can use CmsHttpContext.Current.Searches.GetByGuid or
CmsHttpContext.Current.Searches.GetByPath to get a reference to the image I
want to make into a thumbnail.

Cheers,
Ian.


Stefan [MSFT]

2005-10-30, 5:50 pm

Hi Ian,

if this is a local image this will not work.
If it is a resource gallery item you can use the Url in the
ImagePlaceholder object and use the 3rd element in the URL.

string[] splt = ImagePh.Src.Split('/');
string GUID = "{"+ splt[3] +"}";


Cheers,
Stefan

--
This posting is provided "AS IS" with no warranties, and confers no rights

New to MCMS?
Check out this book: Building Websites Using MCMS: http://tinyurl.com/6zj44
----------------------


"shmeian" <shmeian@discussions.microsoft.com> wrote in message
news:A0930898-2DDF-4B6B-8F34-A5EB7C5E85F3@microsoft.com...
> Hi there,
>
> I'm wanting to make a 'photo summary' template which will show thumbnails
> of
> full sized images in a number of individual 'photo' postings. These photo
> postings will have an image placeholder populated by an image in the
> resource
> gallery.
>
> How do I get the path or guid of the image resource used in the image
> placeholder?
> I figure I can use CmsHttpContext.Current.Searches.GetByGuid or
> CmsHttpContext.Current.Searches.GetByPath to get a reference to the image
> I
> want to make into a thumbnail.
>
> Cheers,
> Ian.
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com