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

Forums / General Discussions / Link to content item

Link to content item

7 posts, 0 answered
  1. Ann
    Ann avatar
    16 posts
    Registered:
    25 Aug 2010
    08 Oct 2010
    Link to this post
    I am trying to link to a content item from inside a paragraph in the content editor.  Is this possible in Beta2? 
    Thanks,
    Ann
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    10 Oct 2010
    Link to this post
    Hello Ann,

    The Content block does not support an option to insert a content item. You could do this programmatically in a simple user or a custom control. You could expose a public string property where you enter the content item Title and then pass it to a method where you retrieve  content data.

    public string ItemTitle
    {
      get;
      set;
    }
     
    ....
       ....
     
    var cntTitle = ItemTitle;
     
    var item = App.WorkWith().ContentItems().Where(itm => itm.Title == cntTitle &&
                    itm.Status == ContentLifecycleStatus.Live).Get().SingleOrDefault();

    Another option is using a custom selector.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Matt
    Matt avatar
    56 posts
    Registered:
    20 Nov 2009
    14 Oct 2010
    Link to this post
    Ivan,

    I don't think this completely resolved Ann's issue.  I believe the idea is for the admin users to be able to embed a link to another content item from within a user-defined paragraph in the content editor.  This would require the ability to select a content item (instead of just a page) in the hyperlink dialog, or at a minimum, the ability to specify a query string to be passed to that page, such that a custom widget on that page could use that query string to pull up the desired piece of content (using something like your code sample).  It seems that you could accomplish this by manually typing the entire URL, but our admin users would never get that, and then you're stuck with an absolute link that includes the domain of the the server and needs to be updated upon migration.

    As an example, I would like to embed links to definitions of terms from various places within generic content.  These definitions exist as other generic content items.  Right now it seems we would have to create a unique page for every term that we want to link to.  Is there a better way to do this, or additional capabilities that will be available in the RC or final release?

    I didn't completely understand the "custom selector" bit... maybe that helps solve this problem?

    Thanks,
    Matt

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    14 Oct 2010
    Link to this post
    Hi Matt,

    This is a workaround - we do not have such selectors/web editors and this is the idea of the "custom selector". The WebEditor/Selector would allow you to pick a content item, link, page - any item you have in a custom datasource. The WebEditor/Selector provides you with a user friendly interface which does not require from business users to know HTML or do some simple coding. We will not be able to include content selectors in the RC release.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Andrei
    Andrei avatar
    553 posts
    Registered:
    27 Nov 2008
    01 Dec 2010
    Link to this post
    Ivan,

    I have a question. In build 4.0.941.0 I do not see the functionality where you can drag and drop a Generic Content onto a page and then define that generic content to be one from the generic content library.

    In 3.7 you had a link type button where you could say - insert some generic content item from your library.

    Am I missing something?

    Many thanks,
    Andrei
  6. Kalina
    Kalina avatar
    176 posts
    Registered:
    27 Oct 2016
    01 Dec 2010
    Link to this post
    Hello Andrei,

    This implementation will come in some of the first weeks after the official release.
    It is with very high priority on our list of tasks.

    Regards,
    Kalina
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Stacey
    Stacey avatar
    291 posts
    Registered:
    18 Oct 2012
    08 Dec 2010
    Link to this post
    Thanks for the tips Ivan.  I was looking at how I could create a snippet of html for navigation using a css sprite menu technique.

    I created a usercontrol with a literal and the code you posted to output to the literal.  Now I can display my custom menu and still have the option to edit it in one (generic content) place via the backend.
7 posts, 0 answered