This project is read-only.

customize the dark theme by bind with some functionality

Jan 23, 2011 at 2:15 PM
Edited Feb 5, 2011 at 5:36 AM

I'm looking for something specific.

The Dark Theme by Bind:

So on the home page they have a subscribe box and an events box.

I noticed the html from this comes from the files T1.cshtml for events and Q1.cshtml for the subscriber box. Two things:

  • Why isn't it editable? How come its a widget but there is no way to edit it?
  • How would I use Orchard.Email or Messaging to push a message and actually make the subscribe button work? Would I have to write a module, I have read the docs for that but I don't see how I would do this?



Jan 24, 2011 at 7:25 PM

Your best bet is probably to ask the authors of that theme.

Jan 25, 2011 at 3:59 AM

true, I did contact them. 

But my second question is more generic:

If I had a widget with a little subscribe form. How would I use orchard API to make the form work? Or would I have to design a module to do this?


Jan 25, 2011 at 4:34 AM

Yeah, I suppose you could build that as a small module with a controller to post the subscribe form to.

Jan 25, 2011 at 1:14 PM

oh interesting, so you mean I could write a module at say /Emailer and then in the cshtml to the widget I can have a @Html.BeginForm() and have it post to /Emailer, the Model will be a dynamic object then? Or would I use to communicate from the csthml file to the controller?

(I'm sorta new to mvc)

Jan 25, 2011 at 7:57 PM

Yes. Well, if your controller action have parameters that can be bound by the system to whatever form fields you have, you're good to go.

Feb 1, 2011 at 3:24 PM

hi Gideon


Bind ships some example html attached to the themes.

It goes in those T/Q Files you see in the Views folder and they can be customized.

It is NOT a widget, since widget contents are saved in Orchard itself. They are "ad hoc shapes" that look just the same as widgets do. So its example code you can use in your site, or remove if you find no use for it.

To customize these shipped "widgets" you simply need to open each one (Dark has T1-T3, Q1-Q4 and Top) and edit either the title, the body of the shape or both.

You will have to attach any custom actions to the buttons in order to make them do stuff like sending emails.



Tiago Duarte.

(BIND Team)

Feb 4, 2011 at 9:50 PM

Thanks very much for your reply.

Can you please give an example of how I would remove one of them (Specifically I want to remove the subscribe box) By remove I mean I want them to not show up at all on the home page.




Feb 5, 2011 at 12:22 AM

So I installed the theme and dug a bit. That subscribe box is defined in Q1.cshtml and is getting injected into layout by this piece of code:

WorkContext.Layout.FooterQuadFirst.Add(New.Q1(), "5");

So you can do two things. You can remove that piece of code from layout.cshtml or you can edit Q1.cshtml and replace the subscription form with whatever you want.

I suppose you could also add a placement for the Q1 shape but that seems way overkill.

Feb 7, 2011 at 2:09 PM

thanks very much Bertrand =)