Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jonathan Roberts 409 posts 1063 karma points
    Sep 14, 2017 @ 09:15
    Jonathan Roberts
    0

    Related Links Manifest file

    Hi,

    Im looking for the Package.Manifest files for the RelatedLinks control. I want to create my own control based on the RelatedLinks control and as I dont want to fully reinvent the wheel I would like to use the existing code but change it ever so slightly in my own App_plugins section.

    Unfortunately the model.config is undefined and I need to know where this is set up in the Manifest file.

    Is there available source out there that can allow me to populate the config for that control?

    Thanks

    Jon

  • Kevin Jump 2310 posts 14695 karma points MVP 7x c-trib
    Sep 14, 2017 @ 14:31
    Kevin Jump
    0

    Hi

    The Related Links control (along with other built in umbraco controls) doesn't have a manifest file.

    the details that would be defined in the manifest file are set in an attribute on the RelatedLink class in the code

    namespace Umbraco.Web.PropertyEditors
    {
        [PropertyEditor(Constants.PropertyEditors.RelatedLinks2Alias, "Related links", "relatedlinks", ValueType = PropertyEditorValueTypes.Json, Icon = "icon-thumbnail-list", Group = "pickers")]
        public class RelatedLinks2PropertyEditor : PropertyEditor
        {
    

    The Javascript for the control is merged into the main umbraco javascript files during the build/release process of umbraco, so those files are not specified. but the live in the source here:

    https://github.com/umbraco/Umbraco-CMS/tree/dev-v7/src/Umbraco.Web.UI.Client/src/views/propertyeditors/relatedlinks

    Sometime there are underlying angular directives and controls you can re-use in your own property editors, but I think the related links one might not be that reusable as it standds. but the code in the folder above should give you a good starting point.

Please Sign in or register to post replies

Write your reply to:

Draft