开发者

Custom content type associated with Blog

开发者 https://www.devze.com 2023-04-01 01:33 出处:网络
I have a question regarding the creation of new content types in the admin panel. So the admin must be able to create a new content type, let\'s call it \"Event\", and this event must be associated t

I have a question regarding the creation of new content types in the admin panel. So the admin must be able to create a new content type, let's call it "Event", and this event must be associated to his Blog. Is it possible to override the view "Content-Blog.DetailAdmin.cshtml" where the "New Post" button is, and and a new button "New Event".

I tried to make an override of this view in my theme but it doesn't work.Any ideas why this doesn't work?

I have like 3 content types in my admin menu on the left "Event,Webcast and Photo Gallery", but when i want to add a new o开发者_运维知识库ne, by default the slug is not the good one. It's by default "/site/slug", and it should be "/site/blog/slug" and if i can override the above view than i think i can solve this problem.


I'm not sure this can be made to reliably work without confusing the blog module (which is a relatively ancient piece of code that would probably be factored differently if done today). Your best bet may actually be to add parts to the blog post content type. Also, do the events really have to be under the blog?

0

精彩评论

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