+1-888-365-2779
Try Now
More in this section

Forums / General Discussions / Dynamic Hyperlinks

Dynamic Hyperlinks

9 posts, 0 answered
  1. Ben
    Ben avatar
    9 posts
    Registered:
    23 Dec 2010
    22 Jun 2011
    Link to this post
    Hi,

    I have just worked out that to get a dynamic hyper link to work you must copy the code generated in a box below and paste it into the link. Bit weird, but hey, it works!

    How do I get this to work with a news list, generic content list or site menu?

    So that clicking on a news item takes you to a specific page that can be renamed without breaking the link?

    Or a site menu lists from a starting node that can be renamed?

    Many thanks

    Ben.
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Jun 2011
    Link to this post
    Hi Ben,

    Since 3.5 all links are dynamic. NewsView controls resolves all links based on the content item ID. If you want to show specific content items you can create a simple widget with content selector and resolve the dynamic url in it.

    All the best,
    Ivan Dimitrov
    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
  3. Ben
    Ben avatar
    9 posts
    Registered:
    23 Dec 2010
    22 Jun 2011
    Link to this post
    Thanks Ivan,

    But I need to make these links dynamic (see attached). That wouldn't do that would it?

    Ben.
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    22 Jun 2011
    Link to this post
    Hello Ben,

    For the first control, you can easily edit SiteMenu.ascx.cs that is under Sitefinity/UserControls/Navigation35.
    For the second control - NewsView ( and all content view based controls) you need to create a custom class that inherits from the base and override the property you want to modify.

    Kind regards,
    Ivan Dimitrov
    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
  5. dale
    dale avatar
    3 posts
    Registered:
    23 Jun 2011
    23 Jun 2011
    Link to this post
    Hi Ivan,

    I'm a .Net developer and trying to create the links dynamically for the menu.

    I've opened SiteMenu.ascx.cs and have seen a method that handles the item data bound event of the menu items.  The code there is used for hiding page groups but would I use this for grabing the guid of the page instead of the name of it? If so what would I need to do to grab the Guid of the page in order to load them dynamically?

    Any input would be much appreciated.

    Thanks,

    Dale
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    23 Jun 2011
    Link to this post
    Hi dale,

    You  can add  new properties where you get the page as a guid

    Take a look at this post

    http://www.sitefinity.com/devnet/forums/sitefinity-3-x/designing-with-sitefinity/news-view-singleitemurl.aspx#1089433

    Greetings,
    Ivan Dimitrov
    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
  7. dale
    dale avatar
    3 posts
    Registered:
    23 Jun 2011
    23 Jun 2011
    Link to this post
    Thanks Ivan,

    I've looked at the post you sent and makes sense to overide the news view.

    In my SiteFinity folder I have SiteFinity/ControlTemplates/ListPageMaster.ascx but do not have SiteFinity/ControlTemplates/ListPageMaster.ascx which is described in the feed.

    Where would I be putting the Custom NewsView? and also where is the orginal NewsView code as cannot locate this?

    Thanks in advance,

    Dale
  8. dale
    dale avatar
    3 posts
    Registered:
    23 Jun 2011
    24 Jun 2011
    Link to this post
    Hi Ivan,

    I didn't receive a reply are you still thinking about this or are you not able to help me with this one?

    Any input would be much appreciated

    Thanks,

    Dale
  9. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    24 Jun 2011
    Link to this post
    Hello dale,

    You need to map the external templates. You can create a class library or class in App_Code that inherits from the base class you want to extend.

    All the best,
    Ivan Dimitrov
    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
Register for webinar
9 posts, 0 answered