Skip to content

Add General link #1

@GoranHalvarsson

Description

@GoranHalvarsson

Hi

I would like to add a General link to your very nice module.
Do you have any suggestions how to do that best?

I used the Prototypes.StandardWrapper and the Sitecore.Shell.Applications.ContentEditor.Link.
It display it correct and it works when adding links etc, the issue is when I do the save.

In javascript, ExpressSubitem.js, I need to get the xml value from the field- like this:

<link text='' linktype='internal' class='' alt=''  querystring='' id='{1EFA3DB2-D932-4788-9527-E814116052DD}' />

Right now I just get the the actual value, like /news/blabla

The function in js:

 subItem.find(".generallink").each(function () {
        var ele = $sc(this);
        var valueHolder = ele.find('input.scContentControl');
       //Do some magic and get the nice XML value:
       //<link text='' linktype='internal' class='' alt=''  querystring='' id='{1EFA3DB2-D932-4788-9527-E814116052DD}' />
        //Right now I just get the the actual value, like /news/blabla


        fields.push({ fieldId: ele.attr("fieldId"), value: valueHolder.val() });
    });

Please help

/Göran

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions