Copied to clipboard

Flag this post as spam?

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


  • PRK 47 posts 119 karma points
    Jul 17, 2014 @ 14:16
    PRK
    0

    Only show DocTypes, which are allowed to Create more than once in Content Section

    Hi all,

    I want to hide all Document Types in Content Section (right Click - Create) which are already created.

    My solution are:

    • Create all Documents and Publish them
    • Extend the Umbraco/Views/content/create.html as follows:

      <div class="umb-dialog-body with-footer" ng-controller="Umbraco.Editors.Content.CreateController">
      
      
      <div class="umb-pane">
      <h5><localize key="create_createUnder">Create a page under</localize> {{currentNode.name}}</h5>
      
      
      <p class="abstract" ng-hide="allowedTypes">
          <localize key="create_noDocumentTypes" />
      </p>
      
      
      <ul class="umb-actions umb-actions-child">
      

    •             <!---------------------------------->
                  <!--Extention from Patrick Kogler.-->
                  <!---------------------------------->
                  <a href="#content/content/edit/{{currentNode.id}}?doctype={{docType.alias}}&create=true" ng-click="nav.hideNavigation()"
                     ng-if="  docType.alias != 'WhatEVER'  ">
      
      
      
                  &lt;i class="large {{docType.icon}}"&gt;&lt;/i&gt;
      
      
                  &lt;span class="menu-label"&gt;
                      {{docType.name}}
                      &lt;small&gt;
                          {{docType.description}}
                      &lt;/small&gt;
                  &lt;/span&gt;
              &lt;/a&gt;
      
      
          &lt;/li&gt;
      
      </ul> </div> </div> .

    I dont like this solution.

    Is there any other way (ApplicationEventHandler ?? )

  • Jason Espin 368 posts 1335 karma points
    Jul 17, 2014 @ 14:18
    Jason Espin
    1

    There's a much easier way of doing this. Simply remove the children that you do not want to allow the user to create from being a valid child of the parent element. This will preserve the existing item and will not allow the user to create anymore children.

  • PRK 47 posts 119 karma points
    Jul 17, 2014 @ 14:32
    PRK
    0

    Wow Jason,

    answered in one minute. :-)

    Your solution is another way, but I need a coded solution, because I manage all our websites over an Dll.

  • 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