Getting resource item guid from a gallery
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Getting resource item guid from a gallery

 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server
Author Message
shmeian
Guest





Posted: Sun Oct 30, 2005 9:50 pm    Post subject: Getting resource item guid from a gallery Reply with quote

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.
Back to top
Stefan [MSFT]
Guest





Posted: Mon Oct 31, 2005 1:50 am    Post subject: Re: Getting resource item guid from a gallery Reply with quote

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...
Quote:
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.

Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> CMS Server All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB