How to set default galleries using C#
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > How to set default galleries using C#




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    How to set default galleries using C#  
Neil


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-25-04 05:35 PM

I'm writing some C# code to set the default galleries for
channels. The following lines of code work OK:

ResourceGallery rootGallery;
rootGallery = cmsContextHttp.RootResourceGallery;
chan.DefaultResourceGallery = rootGallery;

This sets the default resource gallery to the root gallery
("/Resources"). My question is: how do I specify other
gallery locations? What I want to be able to do is
something like this:

chan.DefaultResourceGallery = "/Resources/Library/Admin";

The left-hand side doesn't like being passed a string, so
how is it done?

Regards,
Neil





[ Post a follow-up to this message ]



    Re: How to set default galleries using C#  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-25-04 05:35 PM

Hi Neil,

use the searches object:

ResourceGallery rsg =
cmsContextHttp.Searches.GetByPath("/Resources/Library/Admin") as
ResourceGallery.

Cheers,
Stefan.

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


"Neil" <anonymous@discussions.microsoft.com> wrote in message
news:152901c3fbc1$b6920a70$a501280a@phx.gbl...
> I'm writing some C# code to set the default galleries for
> channels. The following lines of code work OK:
>
> ResourceGallery rootGallery;
> rootGallery = cmsContextHttp.RootResourceGallery;
> chan.DefaultResourceGallery = rootGallery;
>
> This sets the default resource gallery to the root gallery
> ("/Resources"). My question is: how do I specify other
> gallery locations? What I want to be able to do is
> something like this:
>
> chan.DefaultResourceGallery = "/Resources/Library/Admin";
>
> The left-hand side doesn't like being passed a string, so
> how is it done?
>
> Regards,
> Neil







[ Post a follow-up to this message ]



    Re: How to set default galleries using C#  
Neil


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-26-04 10:34 AM

Thank you Stefan. Sorted with your advice.

>-----Original Message-----
>Hi Neil,
>
>use the searches object:
>
>ResourceGallery rsg =
>cmsContextHttp.Searches.GetByPath
("/Resources/Library/Admin") as
>ResourceGallery.
>
>Cheers,
>Stefan.
>
>--
>This posting is provided "AS IS" with no warranties, and
confers no rights.
>
>
>"Neil" <anonymous@discussions.microsoft.com> wrote in
message
>news:152901c3fbc1$b6920a70$a501280a@phx.gbl... 
for 
gallery 
= "/Resources/Library/Admin"; 
so 
>
>
>.
>





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 01:04 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register