Use a html page as a custom section in Umbraco 7 without a tree

夙愿已清 提交于 2019-12-10 21:24:28

问题


I have a HTML page that I want to show in a custom section in Umbraco 7.

I want to do this without having any tree within that section, as everything is already handled within the html file - It is being placed into the Umbraco back end for convenient access.

So far I have implemented IApplication which gets the section to show as expected. I did have a tree with a single node (Inheriting from BaseTree, making this a legacy section), however, I want to make full use of the space available and just load in my html file and have no tree showing.

Removing the nodes from the BaseTree Render method hides the panel that shows the tree, but I can't figure out how to load in the Html file as the default view for that section.

Is there an easy way to do this by essentially setting a default page to load when the user clicks into the section?


回答1:


You can set the default view for a custom section in Umbraco 7 by adding a new section element to Dashboard.config as follows:

  <section alias="StartupCustomDashboardSection">
    <areas>
      <area>custom</area>
    </areas>
    <tab caption="Get Started">
      <control>/app_plugins/custom/defaultview.html</control>
    </tab>
  </section>

where the <area> element must contain the alias of your custom section, all in lower case.

The <control> element contains the path of the default html file.



来源:https://stackoverflow.com/questions/28386565/use-a-html-page-as-a-custom-section-in-umbraco-7-without-a-tree

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!