Copied to clipboard

Flag this post as spam?

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


  • Henrik Vincent 122 posts 616 karma points
    Nov 01, 2018 @ 11:55
    Henrik Vincent
    0

    Show page categories in custom dashboard

    Hi guys

    I'm working on a news website, and I'm wanting to simplify the creation of new posts, for the editors.

    Therefor I've made a custom dashboard, where I wan't to list links for all the sites blogcategories, so when they click a category, they get sent directly to the Create post for the respective category.

    I've made several listviews, where I achieve something similar, but I'm having trouble figuring out how to do this in a dashboard.

    I tried with some code from a list view, but can't seem to get the categories.

    I tried the following:

    Controller

    angular.module("umbraco").controller("CustomWelcomeDashboardController",
    function ($location) {
    "use strict";
    
        var vm = this;
    
    })
    

    View

    <div class="welcome-dashboard">
    <h1 id="welcomeH1">Velkommen til Afventer.dk!</h1>
    
    <h2>Vælg kategori du vil oprette artikel i:</h2>
    
    <div ng-controller="CustomWelcomeDashboardController as vm"
         ng-if="items">
    
      <div class="button-box" 
          ng-repeat="item in items">
          <a class="btn btn-primary btn-large" ng-click="vm.clickItem(item)" href="$location?doctype=article&create=true">{{item.name}}</a>
      </div>
    
    </div>
    

    Hope you guys can point me in the right direction.

    Thank you all in advance

    Henrik

  • Henrik Vincent 122 posts 616 karma points
    Nov 02, 2018 @ 08:19
    Henrik Vincent
    0

    I added the links manually for now, but would like to make it more dynamic, so I don't have to edit the dashboard, if an editor adds a new blog category.

    Best

    Henrik

  • Henrik Vincent 122 posts 616 karma points
    Nov 09, 2018 @ 12:29
    Henrik Vincent
    0

    Bump

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies