开发者

OrchardCMS layout of admin pages

开发者 https://www.devze.com 2023-03-23 11:11 出处:网络
I\'m trying to change the layout of the admin page for a type and I\'m struggling. The client is very specific on the order of the fields and I\'m not sure how to do it.

I'm trying to change the layout of the admin page for a type and I'm struggling. The client is very specific on the order of the fields and I'm not sure how to do it.

I've created an admin theme and changed the placement.info, but it doesn't seem to work. Are there any hooks I could use to accomplish this?

Any help much appreciated.

My placement.info in the admin theme.

  <Match ContentType="Course">
    <Place Parts_Routable_Edit="Content:1" />
    <Place Fields_Contrib_Taxono开发者_开发问答myField_Edit="Content:2" />
    <Place Parts_Taxonomies_Term_Fields="Content:2.5" />
    <Place Parts_MediaPickerField_Edit="Content:3" />
    <Place Parts_Course_Edit="Content:4" />
    <Place Parts_Tags_Edit="Content:5" />
  </Match>

There's also another problem. I would like 3 taxonomies, and have them placed in different areas of the admin screen. Any idea how to do that?


Since 1.5, you can change the order of parts and fields in the editor, from the admin dashboard. Go to Content Types, select the type, then click on "Manage Placement". You can then drag and drop parts and fields around.


Note that admin themes need to contain a IThemeSelector implementation that gives it a priority of more than 100, which is the priority of the default admin theme.


It really depends on what you want to change. A lot of the admin stuff uses regular ASP MVC, so all you really need to do is override a view or a couple of shapes.

For instance, if you wanted to change how the Modules page was rendered, you could do the following:

Create the folder Views/Orchard.Modules/Admin (this matches the module/controller name) in your theme. Inside it create a view called Index.cshtml, and copy and paste the code from the same view in Orchard.Modules - now you can change your version as much as you like and it should override the default view.

For overriding shapes it is a case of just working out the shape name via the shape tracing module and then adding your own version in your Views folder.

All this is fairly generic advice though, again it really does depend on exactly what you want to change.

0

精彩评论

暂无评论...
验证码 换一张
取 消