Content Item Links

Topics: Core, Customizing Orchard
Oct 24, 2013 at 7:31 PM
When creating a new page, how do you create a link to a content item from a content picker? The only option for links in the TinyMCE editor only provides a text box for the link url.

We'd like to be able to give our user a list of content items to pick from. I feel like this is a pretty common CMS feature. I have to be missing something here.
Developer
Oct 25, 2013 at 9:25 AM
You're not really missing anything, this is not a core feature of Orchard and I don't know of any module out there doing this (if you're, as I've understood, talking about inserting links to content items into the body - or other rich - text).

Implementing this would need a TinyMCE plugin, what in turn would really need that there would be a way to extend the current TinyMCE module.
Oct 25, 2013 at 2:11 PM
Thanks for the reply.

Yea, I kind of figured it'd boil down to creating a TinyMCA plugin. Not going to mess with that.

But I did find that it would seem that if this is what you want to do, the "intended" way to do it seems to be to first create a menu in Navigation for the links you want to add. Then create a layer for the page you want to add them too. Then add a menu widget to that layer in whatever zone you want.

Not exactly the same as being able to slap a link in the middle of a paragraph to a content page. But it'll accomplish the task I suppose.

Thanks again.
Oct 25, 2013 at 2:29 PM
Edited Oct 25, 2013 at 2:33 PM
I had also dreamed of this feature, being able to click with mouse a point in the body of a page (or any content item with BodyPart) and here right click for the content picker which will create a dynamic zone around (quadratic around :) ) this point and drop a shape to display the content I selected. Orchard 3.
Coordinator
Oct 25, 2013 at 5:54 PM
Someone should create this feature in TinyMce, with a dependency on Content Picker: a new button added to tinymce to pick a content item, and a link to it would be inserted. This could also generate a logical link but it would need a custom filter to replace it dynamically with the targeted content.
Oct 25, 2013 at 6:42 PM
And what about the orchard zones system?
May be we could use real layers using CSS to manage them, but doing this is bye-bye bootstrap.
from what I understand from orchard zones, they can't overlay?
Only you, Sebastien, have an idea of how to implement this with actual constraints:)
Coordinator
Oct 25, 2013 at 7:37 PM
I don't see the link with zones at all. TinyMCe is extensible using javascript events. Look at the Media Picker implementation for instance, this should be the same experience, hence the same code.
Oct 25, 2013 at 7:55 PM
May be we don't see the same feature, let's be more 'factual'(is this english? not important)

I click somewhere in body ( left : 200px; top: 33 px) and choose to insert a taxonomie menu ?
How to deal with this ?
My mind is build (civil ingeneering )to use layers for this with a display process displaying the stacked layers from under to upper, but how to do this in Orchard ?
Oct 26, 2013 at 11:50 PM
I think you're talking about something completely different.

Anyway, I've implemented such an TinyMCE plugin. It works, but I haven't completed cross browser testing yet.

Sebastien, are you talking about inserting the content item ID along with the link and resolving the URL using the ID and an IHtmlFilter on page request? What would be the advantange, assuming that the permalink of a content item is never changed?
Oct 28, 2013 at 2:40 PM
Thanks! That's exactly what I was looking for. Awesome!
Oct 28, 2013 at 2:52 PM
Yes very good add to insert links to content items.
Should be inserted in core.

I was on another planet:) may be in Orchard v2.
Coordinator
Oct 28, 2013 at 5:33 PM
Christian, we do take pull requests all the time, you know...
Oct 28, 2013 at 5:42 PM
Edited Oct 28, 2013 at 5:43 PM
Provided they are compliant, or they could stay in limbo :)
I know, you know, time is shorter each new day....
Oct 15 at 12:29 AM
I can't find if a PR was ever submitted for the changes JasperD made, but this is an excellent addition and I'm wondering how/if/when we can get it folded in to Core?

If I rebase JasperD's changes to 1.8.1, is it possible a PR would be accepted? At least for the TinyMCE bit (not sure about Markdown support at this point).
Developer
Oct 15 at 5:03 AM
Edited Oct 15 at 5:05 AM
First I would check if there is an issue for this feature. If there is none, then it is best to create one first so we can triage it. Reading the comments here, I think we do want it.
Oct 15 at 7:05 AM
Edited Oct 15 at 7:07 AM
Well I spoke too soon.

Issue #19258 was created on Nov 17, 2012 and generated this PR, which has since been cancelled.
Oct 21 at 9:01 PM
New PR focuses on TinyMCE feature