| Author |
Message |
Lta
Guest
|
Posted:
Tue Oct 18, 2005 4:51 pm Post subject:
Searches.GetByGuid |
|
|
Hi,
I am creating a site's navigation and am setting the rootChannel by using
Searches.GetByGuid which I have read is the most efficient and reliable.
The search returns an HierarchyItem object.
How do I convert this object to a Channel object that I can then use to
create the navigation?
Thanks
John |
|
| Back to top |
|
 |
Lta
Guest
|
Posted:
Tue Oct 18, 2005 4:51 pm Post subject:
RE: Searches.GetByGuid |
|
|
Found it...
Channel c = CmsHttpContext.Current.Searches.GetByGuid(Guid) as Channel;
"as Channel" was the magic!
"Lta" wrote:
| Quote: | Hi,
I am creating a site's navigation and am setting the rootChannel by using
Searches.GetByGuid which I have read is the most efficient and reliable.
The search returns an HierarchyItem object.
How do I convert this object to a Channel object that I can then use to
create the navigation?
Thanks
John |
|
|
| Back to top |
|
 |
Dangeriz
Guest
|
Posted:
Mon Nov 07, 2005 5:50 pm Post subject:
RE: Searches.GetByGuid |
|
|
You can also "cast" the HierarchyItem like this:
Channel c = (Channel) CmsHttpContext.Current.Searches.GetByGuid(Guid);
similarly you can cast the HierarchyItems to other valid CMS objects which
are:
Posting, Template, TemplateGallery, Resource, ResourceGallery.
--
Dangeriz
"Lta" wrote:
| Quote: | Found it...
Channel c = CmsHttpContext.Current.Searches.GetByGuid(Guid) as Channel;
"as Channel" was the magic!
"Lta" wrote:
Hi,
I am creating a site's navigation and am setting the rootChannel by using
Searches.GetByGuid which I have read is the most efficient and reliable.
The search returns an HierarchyItem object.
How do I convert this object to a Channel object that I can then use to
create the navigation?
Thanks
John |
|
|
| Back to top |
|
 |
|
|
|
|