MonoX support board

Start the conversation, ask questions and share tips and solutions with fellow developers.

Non-registered users can only browse through our support boards. Please register now if you want to post your questions. It takes a second and it is completely free. Alternatively, you can log in without registration using your credentials at major sites such as Google, Microsoft Live, OpenId, Facebook, LinkedIn or Yahoo.

Template name drop down box is disabled (Closed) (Mono Support )

Viewed 10248 time(s), 2 post(s) 8/11/2011 3:00:29 PMby Guoxin
Guoxin

Guoxin

8/11/2011 3:00:29 PM
Hello, I would like to change the template in Edit mode. But the template name drop down box is disabled. How can I change the template in Edit mode? As well, where to write code to set the template? For example, I would like to change the template for Login web part and Menu web part. Thanks.
This content has not been rated yet. 
17 Reputation 2 Total posts
denis

denis

8/11/2011 3:20:05 PM
Hi,
Not all Web parts are using the templating infrastructure. As a rule, only the "repeatable" Web parts (blogs posts, comments, wall notes, etc.) are using templates. If you need to change the appearance of such controls, all you have to do is to change the existing templates (in App_Templates/[your theme name]/) or add a new template and use the part settings to point to it. Templates are simple HTML or ASCX files with placeholders that are used by MonoX to inject the dynamic content.
Changing the appearance of simple parts like login is simple. Just create the new Web part and copy the markup from the LoginModule.ascx to it. In the codebehind (ascx.cs) say that your new module inherits from MonoSoftware.MonoX.ModuleGallery.LoginModule. Now you can change the front-end markup as you wish - please don't remove the existing controls from it (as they could be referenced from the codebehind); instead, you can set their visibility from code.
Rated 5.00, 1 vote(s). 
7207 Reputation 956 Total posts