Mono Support How to change module appearance? 

Viewed 24515 time(s), 2 post(s), 6/8/2009 1:41:43 PM - by JoeUser
6/8/2009 1:41:43 PM
26 Reputation 11 Total posts

I want to change the look and feel of an existing module. The problem is that the module is not using the templating mechanism, as it does not include the repeating elements: it really simple and contains only a few textboxes and a button. However, I need several versions of the UI for this module, while the backend functionality will remain the same.
Any ideas?

1
6/8/2009 3:10:33 PM
15993 Reputation 2214 Total posts

Hi,

there are several ways to change look and feel of the module.

1. You can implement custom css selector class and change appearance of the module with css classes (Maybe the easiest way)
2. You can use the "Two markup files on code behind" technique.

2.1 Tell your class that it is templated, in Constructor (IsTemplated = true;)
2.2 Create a folder for your module in "App_Templates/YourThemeName/ModuleName" and set "ControlSpecificTemplateSubPath" property of the module to "ModuleName"
2.3 Create a UserControl inside that folder, and use ActionBox template as an example

<%@ Control
Language="C#"
AutoEventWireup="true"
Inherits="MonoSoftware.MonoX.ActionBox.MonoXActionBoxControl"
%>












<%--Options Start--%>
<%--Note: This ID is hard-coded--%>

<%--Options End--%>

<%--Content Start--%>
<%--Note: This ID is hard-coded--%>




<%--Content End--%>


2.4 Put as many as you want UserControls with all sorts of layouts inside the markup
2.5 Now you can load your templated layout with combination of „TemplateFullVirtualPath“ and „Template“ properties of BasePart
2.6 Now you need to put all of your controls dynamically to panels / content place holders

2
This is a demo site for MonoX. Please visit Mono Software for more info.