This project is read-only.

AutoRoute - Disable Promote To Homepage?

Topics: Customizing Orchard, Writing modules
Oct 28, 2014 at 2:10 PM
Edited Oct 28, 2014 at 3:09 PM
UPDATE: I've split this out into separate threads per question. I've spent many years helping out on and I appreciate nobody wants to dig through big blocks of text so I'm drilling down to the specifics :)

I'm hitting a lot of dead ends here with developing a site using Orchard. Its a shame that the documentation is so sparse because it feels like such a powerful system and I love the way it seems to be architectured but with everything being built dynamically at runtime and there being almost no documentation other than basic overviews I'm at a loss most of the time where to go next.

Promote To Home Page
I dont want the "promote to home page" option to be available on this custom type but it seems its hardwired into the Autoroute module. I think the only way I can override this is by duplicating the admin theme and taking responsibility for rendering the autoroute. Is there any way I can pass a value through to PromoteToHomePage to make it hidden?
Oct 28, 2014 at 4:14 PM
There is a corresponding permission that you can revoke from user roles so they won't be able to promote items to the home page (can't remember the name of the permission but it has "home" in its name). This wasn't there in Orchard forever but I think with 1.8 it should be definitely available.
Oct 28, 2014 at 4:22 PM
Edited Oct 28, 2014 at 4:22 PM
Thanks for your reply.

I'm writing this as a module I just wanted to disable the Promote To Home Page for my ExampleType ContentType rather than disabling it for everything that has an AutoroutePart attached.

I've just realised I didn't make this clear when I split it out from my single thread earlier, sorry.

I haven't read about permissions yet but would this scenario be possible?
Oct 28, 2014 at 4:26 PM
I see. No, what is possible OOTB is that you disallow this feature for everyone of a certain user role (so e.g. all editors, all bloggers...).
Oct 28, 2014 at 6:01 PM
Edited Oct 28, 2014 at 6:01 PM
Yeah just disable it in Permissions and you will be sorted! - no need to write a module