Need the full URL of a Events item

Posted by Community Admin on 03-Aug-2018 23:47

Need the full URL of a Events item

All Replies

Posted by Community Admin on 13-Sep-2011 00:00

Hi,

I made an user control that shows the Events. and i get the URL with this:

<a href="<%# ((DateTime)DataBinder.Eval(Container.DataItem, "EventStart")).ToString("/yyyy'/'MM'/'dd/") %><%# DataBinder.Eval(Container.DataItem, "UrlName") %>">

and throws an incomplete url... this is just the event page, i need the parent page name also.



thanks in advance!

Posted by Community Admin on 15-Sep-2011 00:00

Hi Mario,

Unfortunately there isn't a way. What you try to do is part of the logic that is implemented in the

UrlResolver.Resolve() method, that cannot be carried to the template.

Kind regards,
Lubomir Velkov
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 15-Sep-2011 00:00

Thanks for your answer Lubomir

BTW I manage to solve this through

<a href="
<%# "/" + SitefinityWebApp.UserControls.Constants.projectName %>
<%# DataBinder.Eval(Container.DataItem, "ApplicationName") %>
<%# ((DateTime)DataBinder.Eval(Container.DataItem, "EventStart")).ToString("/yyyy'/'MM'/'dd/") %>
<%# DataBinder.Eval(Container.DataItem, "UrlName") %>
" >

this way I can generate correct url to show the event :D

This thread is closed