Link to content item

Posted by Community Admin on 03-Aug-2018 19:07

Link to content item

All Replies

Posted by Community Admin on 08-Oct-2010 00:00

I am trying to link to a content item from inside a paragraph in the content editor.  Is this possible in Beta2? 
Thanks,
Ann

Posted by Community Admin on 10-Oct-2010 00:00

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

Posted by Community Admin on 14-Oct-2010 00:00

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

Posted by Community Admin on 14-Oct-2010 00:00

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

Posted by Community Admin on 01-Dec-2010 00:00

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

Posted by Community Admin on 01-Dec-2010 00:00

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

Posted by Community Admin on 08-Dec-2010 00:00

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.

This thread is closed