Copied to clipboard

Flag this post as spam?

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


  • torneborn 9 posts 39 karma points
    Dec 22, 2020 @ 16:04
    torneborn
    0

    Is there an easy way to show commonly used tags in the backoffice?

    Hi,

    I'm trying to add commonly used tags (or all tags in a scrollable area) below or next to the tags input area in the backoffice, is there an easy and elegant way to do this? if not, what is the way to go about this?

    enter image description here

    thanks

  • Amir Khan 1282 posts 2739 karma points
    Dec 22, 2020 @ 17:46
    Amir Khan
    0

    You would probably need to create a custom Data Type that queries your tag group. You could then generate a list of tags and sort them by frequency of use and limit the list if you'd like.

  • torneborn 9 posts 39 karma points
    Dec 23, 2020 @ 14:05
    torneborn
    0

    I know how to do the query, but where do I do the query? how do I get the custom data type visible in my visual studio and where do I write the code?

  • Amir Khan 1282 posts 2739 karma points
    Dec 23, 2020 @ 14:20
    Amir Khan
    0

    Here's an example for a different editor, should get you started at least: https://our.umbraco.com/documentation/Tutorials/creating-a-property-editor/

  • torneborn 9 posts 39 karma points
    Dec 23, 2020 @ 14:46
    torneborn
    0

    I follow these steps but the property editor does not show up in the property editor list when creating a data type.

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 23, 2020 @ 15:02
    Huw Reddick
    0

    you need to create a packa.manifest for your property editor and place it in a folder under app_plugins

    enter image description here

    My manifest looks like

    {
      // we can define multiple editors
      "propertyEditors": [
        {
          /*this must be a unique alias*/
          "alias": "TagList",
          /*the name*/
          "name": "Common Tags",
          /*the icon*/
          "icon": "icon-tags",
          /*grouping for "Select editor" dialog*/
          "group": "pickers",
          /*the HTML file we will load for the editor*/
          "editor": {
            "view": "~/App_Plugins/TagList/taglisteditor.html",
            "valueType": "JSON"
          }
        }
      ],
      // array of files we want to inject into the application on app_start
      "javascript": [
        "~/App_Plugins/TagList/taglisteditor.controller.js",
        "~/App_Plugins/TagList/taglist.resource.js"
      ]
    }
    
  • torneborn 9 posts 39 karma points
    Dec 23, 2020 @ 15:09
    torneborn
    0

    Ah ok, it works, how do I do this query? I thought this would be done through C# but it is done through angular I am not experienced with that? any pointers? should i make an api call in my c# code and call it from angular?

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 23, 2020 @ 15:25
    Huw Reddick
    0

    that is what I am doing yes. I am populating a mutiselect dropdown with the top 10 tags in the group used by the page

    enter image description here

    The number displays the number of times that tag appears in the metatag group (the one used by that page)

    I have just created a local package from my code and am just about to test installing it in a clean umbraco, hopefully if all goes ok I will upload it.

  • torneborn 9 posts 39 karma points
    Dec 23, 2020 @ 15:42
    torneborn
    0

    Awesome, looking good, I will be working on my own implementation in the meantime.

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 23, 2020 @ 17:05
    Huw Reddick
    100

    I have uploaded my source code to gitHub if you wanted to take a look at what I did.

    Tag Lister for Umbraco

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 23, 2020 @ 09:35
    Huw Reddick
    0

    I am currently working on a property editor that does exactly this, hopefully when complete I will post it.

  • Huw Reddick 1737 posts 6098 karma points MVP c-trib
    Dec 23, 2020 @ 17:31
    Huw Reddick
    0

    I have uploaded a package, if anyone is interested in giving it a try, it is fairy basic at the moment but does the job. Hopefully will improve it after Christmas.

    Common Tag picker

Please Sign in or register to post replies

Write your reply to:

Draft