Copied to clipboard

Flag this post as spam?

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


  • Ayo Adesina 445 posts 1058 karma points
    Feb 12, 2015 @ 14:00
    Ayo Adesina
    0

    Grid Layout - Settings, Where do I put the JSON for the elements

    Hey guys,

    I'm using the Grid Layout property editor.

    Now I have worked out you need JSON to create settings for example:

    [
      {
    "label": "Background color",
    "description": "Choose background color",
    "key": "class",
    "view": "radiobuttonlist",
    "applyTo": "row",
    "prevalues": [
      "light",
      "dark",
      "yellow",
      "blue",
      "purple",
      "full",
      "full triangle"
    ]
      }
    ]
    

    This works, when I am in the content tab, got to the page with the layout click settings i can select from the options above.

    The problem is I want to add settings to the element that I add to the grid layout, but when I click the settings OF THE ELEMENT its empty.

    Please have a look at this screen shot for clarification.

    http://picpaste.com/Untitled-1-LNed9RHN.png

    Thanks in advance

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Feb 12, 2015 @ 14:30
    Jan Skovgaard
    0

    Hi Ayo

    Is it the location where you need to place the JSON you have doubts about? It should be placed in the /config/grid.editors.config.json file (Think that's what it's called)... If you have already done that and nothing displays then you should probably recycle the app pool in order for the changes to take effect.

    Hope this helps and that I understood your question :)

    /Jan

  • Rune Hem Strand 147 posts 911 karma points hq c-trib
    Feb 12, 2015 @ 14:50
    Rune Hem Strand
    1

    Hi Ayo

    If you want to enable the settings on cells (and not rows) you need to change the value of the applyTo key to cell. Like this:

    [
     {
      "label": "Background color",
      "description": "Choose background color",
      "key": "class",
      "view": "radiobuttonlist",
      "applyTo": "cell",
      "prevalues": [
        "light",
        "dark",
        "yellow",
        "blue",
        "purple",
        "full",
        "full triangle"
      ]
     }
    ]
    

    If you remove the applyTo key, the settings will be available on both rows and settings. Also explained in the documentation

    /Rune

  • Ayo Adesina 445 posts 1058 karma points
    Feb 12, 2015 @ 14:57
    Ayo Adesina
    2

    All working now thanks Rune.

    One other thing though................................

    Where have I been living? Under a Rock? when did this Grid layout feature get added to Umbraco, I found by chance when I installed the faneo starter kit by mistake.

    As my little daughter would say.... this feature is SICK SICK SICK SICK SICK....... LOVE IT!

    Well done Umbraco team, this one feature takes umbraco to another level!

    Thank you..... Long live Umbraco!

Please Sign in or register to post replies

Write your reply to:

Draft