Foros de discusión

Strtucture and Template

thumbnail
Marcelo Cardoso Oliveira, modificado hace 7 años.

Strtucture and Template

New Member Mensajes: 11 Fecha de incorporación: 20/02/13 Mensajes recientes
Hello,
If anyone can help me:
I am using a model with this structure, however when I try to enter the testo in html content it does not leave. the field appears however is as if you were disqualified.
See the sources below

Structure:
"availableLanguageIds": [
        "en_US"
    ],
    "defaultLanguageId": "en_US",
    "fields": [
        {
            "label": {
                "en_US": "Item Title"
            },
            "predefinedValue": {
                "en_US": "Item Title"
            },
            "style": {
                "en_US": ""
            },
            "tip": {
                "en_US": ""
            },
            "dataType": "string",
            "indexType": "keyword",
            "localizable": true,
            "name": "ItemTitle",
            "readOnly": false,
            "repeatable": true,
            "required": false,
            "showLabel": true,
            "type": "text",
            "nestedFields": [
                {
                    "label": {
                        "en_US": "Item Image"
                    },
                    "predefinedValue": {
                        "en_US": ""
                    },
                    "style": {
                        "en_US": ""
                    },
                    "tip": {
                        "en_US": ""
                    },
                    "dataType": "image",
                    "fieldNamespace": "ddm",
                    "indexType": "keyword",
                    "localizable": true,
                    "name": "ItemImage",
                    "readOnly": false,
                    "repeatable": false,
                    "required": false,
                    "showLabel": true,
                    "type": "ddm-image"
                },
                {
                    "label": {
                        "en_US": "HTML Content"
                    },
                    "predefinedValue": {
                        "en_US": ""
                    },
                    "style": {
                        "en_US": ""
                    },
                    "tip": {
                        "en_US": ""
                    },
                    "dataType": "html",
                    "fieldNamespace": "ddm",
                    "indexType": "keyword",
                    "localizable": true,
                    "name": "htmlContent",
                    "readOnly": false,
                    "repeatable": false,
                    "required": false,
                    "showLabel": true,
                    "type": "ddm-text-html"
                },
                {
                    "label": {
                        "en_US": "Link URL"
                    },
                    "predefinedValue": {
                        "en_US": ""
                    },
                    "style": {
                        "en_US": ""
                    },
                    "tip": {
                        "en_US": ""
                    },
                    "dataType": "string",
                    "indexType": "keyword",
                    "localizable": true,
                    "name": "linkTo",
                    "readOnly": false,
                    "repeatable": false,
                    "required": false,
                    "showLabel": true,
                    "type": "text",
                    "nestedFields": [
                        {
                            "label": {
                                "en_US": "Link Text"
                            },
                            "predefinedValue": {
                                "en_US": ""
                            },
                            "style": {
                                "en_US": ""
                            },
                            "tip": {
                                "en_US": ""
                            },
                            "dataType": "string",
                            "indexType": "keyword",
                            "localizable": true,
                            "name": "linkText",
                            "readOnly": false,
                            "repeatable": false,
                            "required": false,
                            "showLabel": true,
                            "type": "text"
                        }
                    ]
                }
            ]
        }
    ]
}

Template:

<div class="secondary-background-color">
    <div class="upper-modules">
        <section class="container-fluid-1280">

           &lt;#if ItemTitle.getSiblings()?has_content&gt;
                    &lt;#assign itemsSize = "${ItemTitle.getSiblings()?size}"&gt;
                    &lt;#if itemsSize == "1"&gt;
                        &lt;#assign col = "col-md-12"&gt;
                    &lt;#elseif itemsSize == "2"&gt;
                        &lt;#assign col = "col-md-6"&gt;
                    &lt;#elseif itemsSize == "3"&gt;
                        &lt;#assign col = "col-md-4"&gt;
                    &lt;#elseif itemsSize == "4"&gt;
                        &lt;#assign col = "col-md-3"&gt;
                    &lt;#else&gt;
                        &lt;#assign col = "col-md-2"&gt;
                    <!--#if-->

                &lt;#list ItemTitle.getSiblings() as cur_ItemTitle&gt;
                    <div class="${col}">
                        <img alt="${cur_ItemTitle.ItemImage.getAttribute(" alt")}" class="center-block img-responsive img-spacing" src="${cur_ItemTitle.ItemImage.getData()}">
                        <h2>${cur_ItemTitle.getData()}</h2>
                        <p>${cur_ItemTitle.htmlContent.getData()}</p>
                        <p><a class="small text-uppercase" href=" ${cur_ItemTitle.linkTo.getData()}"><strong>${cur_ItemTitle.linkTo.linkText.getData()}</strong></a></p>
                    </div>
                <!--#list-->

            <!--#if-->

        </section>
    </div>
</div>