|
Home > Archive > Microsoft Content Management Server > July 2007 > Need to search resource galleries
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 |
Need to search resource galleries
|
|
|
| After migrating from CMS 2001 to 2002, we had to reassign all
permissions. In a few instances, we missed the resource galleries
needed for each user. As a result, an error is thrown when an update
is attempted if the posting includes a resource in a gallery that is
inaccessible to the editor. This is resolved when we add the user's
access to the proper gallery.
It is difficult to identify which gallery contains a random resource.
Is there a way to search resource galleries or trace a resource
(image, PDF, etc.) back to its container/gallery?
| |
| Stefan Goßner [MSFT] 2007-07-19, 7:17 am |
| Hi Rob,
the resource contains the GUID in the URL.
You can use Searches.GetByGuid using the GUID from the URL (you need to add
the braces before and after) to get the item. Then check the Path property
of the item to get the location.
Cheers,
Stefan
"Rob" <saxon_rm@mercer.edu> wrote in message
news:1184794211.770560.24390@g12g2000prg.googlegroups.com...
> After migrating from CMS 2001 to 2002, we had to reassign all
> permissions. In a few instances, we missed the resource galleries
> needed for each user. As a result, an error is thrown when an update
> is attempted if the posting includes a resource in a gallery that is
> inaccessible to the editor. This is resolved when we add the user's
> access to the proper gallery.
>
> It is difficult to identify which gallery contains a random resource.
> Is there a way to search resource galleries or trace a resource
> (image, PDF, etc.) back to its container/gallery?
>
| |
|
| Thanks, Stefan, but I need some further specifics.
I'm brand new to .Net and C# coding. I tried the process you
suggested but my search only returns a null. Any pointers??
Here is my code:
// sample GUID pasted to text box: FD5022B7-9DF6-4DEA-
A45F-674538E2C22B
private void Button1_Click(object sender, System.EventArgs e)
{
CmsHttpContext cmsContext =3D CmsHttpContext.Current;
String strResourceGUID =3D "{" + txtGUID.Text.ToString() + "}";
Resource rsResource =3D
cmsContext.Searches.GetByGuid(strResourceGUID) as Resource;
if (rsResource !=3D null)
{
txtOutput.Text =3D rsResource.Path.ToString();
}
else
{
txtOutput.Text =3D "No Resource Found!!";
}
}
On Jul 19, 2:44 am, "Stefan Go=DFner [MSFT]"
<stef...@online.microsoft.com> wrote:
> Hi Rob,
>
> theresourcecontains the GUID in the URL.
> You can useSearches.GetByGuidusing the GUID from the URL (you need to add
> the braces before and after) to get the item. Then check the Path property
> of the item to get the location.
>
> Cheers,
> Stefan
>
> "Rob" <saxon...@mercer.edu> wrote in message
>
> news:1184794211.770560.24390@g12g2000prg.googlegroups.com...
>
>
>
>
>
> - Show quoted text -
|
|
|
|
|