Get the template name form the GUID or URL
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 > Get the template name form the GUID or URL




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

    Get the template name form the GUID or URL  
lucky


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


 
01-16-07 12:19 PM

Hi Guys

I have a GUID and I need to find out what is the name of the template
used for the page corresponding to this GUID.

I tried variations around this but without any success:

Set thisURLObj = thisSearches.GetByGUID(myRs.Fields.Item("GUID"))
response.write thisURLObj.Template.Name


I work with CMS 2001

Any idea?

Thanks

Luc






[ Post a follow-up to this message ]



    Re: Get the template name form the GUID or URL  
Stefan Goßner [MSFT]


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


 
01-16-07 12:19 PM

Hi Luc,

what is the result you get with the code below?

Cheers,
Stefan


"lucky" <lfelix@nordnet.fr> wrote in message
news:1168943406.190540.203240@q2g2000cwa.googlegroups.com...
> Hi Guys
>
> I have a GUID and I need to find out what is the name of the template
> used for the page corresponding to this GUID.
>
> I tried variations around this but without any success:
>
> Set thisURLObj = thisSearches.GetByGUID(myRs.Fields.Item("GUID"))
> response.write thisURLObj.Template.Name
>
>
> I work with CMS 2001
>
> Any idea?
>
> Thanks
>
> Luc
>







[ Post a follow-up to this message ]



    Re: Get the template name form the GUID or URL  
lucky


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


 
01-17-07 12:18 PM

I get the following error message:


Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method: 'Template'

cheers

Luc






[ Post a follow-up to this message ]



    Re: Get the template name form the GUID or URL  
Stefan Goßner [MSFT]


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


 
01-17-07 12:18 PM

Hi Lucky,

sounds as if the GUID does not identify a Posting object.
Please use the code below to verify this:

<%
Dim pSearches, pResult, strGUID
' initialize the Searches object
Set pSearches = Autosession.Searches

strGUID = myRs.Fields.Item("GUID")
Set pResult = pSearches.GetByGUID(strGUID)
If pResult Is Nothing Then
' Object does not exist or user does not have rights.
%>
<P>Object not found!</P>
<%
Else
' an object is returned, OK to use it
%>
<P>Found the <%=pResult.Name%> <%=pResult.Type%></P>
<% End If %>
Cheers,
Stefan

"lucky" <lfelix@nordnet.fr> wrote in message
news:1169022344.901925.285410@m58g2000cwm.googlegroups.com...
>I get the following error message:
>
>
> Microsoft VBScript runtime (0x800A01B6)
> Object doesn't support this property or method: 'Template'
>
> cheers
>
> Luc
>







[ Post a follow-up to this message ]



    Re: Get the template name form the GUID or URL  
google@australix.net


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


 
01-18-07 06:26 AM

Fixed!

Actually some of my items were not postings but channels.
Thanks a lot for your help Stefan

cheers


Stefan Go=DFner [MSFT] wrote:[vbcol=seagreen]
> Hi Lucky,
>
> sounds as if the GUID does not identify a Posting object.
> Please use the code below to verify this:
>
> <%
> Dim pSearches, pResult, strGUID
> ' initialize the Searches object
> Set pSearches =3D Autosession.Searches
>
> strGUID =3D myRs.Fields.Item("GUID")
> Set pResult =3D pSearches.GetByGUID(strGUID)
> If pResult Is Nothing Then
>   ' Object does not exist or user does not have rights.
> %>
>   <P>Object not found!</P>
> <%
> Else
>    ' an object is returned, OK to use it
> %>
>   <P>Found the <%=3DpResult.Name%> <%=3DpResult.Type%></P>
> <% End If %>
> Cheers,
> Stefan
>
> "lucky" <lfelix@nordnet.fr> wrote in message
> news:1169022344.901925.285410@m58g2000cwm.googlegroups.com... 






[ 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