dream genie
 
CMS and Website Builder
contact us
 
+44 (0)1392 202078
 
 
You are here: Home > Blog > Move Design Template settings to your Theme   Go Back

Move Design Template settings to your Theme

Posted: Thursday, 27th January, 2011 at 8:59 PM | By: Administrator
Jan
27
 

 

 

 

 

 

 

 

 

 

Overview

TECHNICAL NOTE: This article is targeted at advanced user/designers who want to develop Dreamgenie's bespoke advanced themes features, all the below can be acheived via simple mouse click selections in your website control  panel under the option [Design Template]

This article details how to transfer and incorporate your Design Template settings directly into your theme. Doing this will enable you to take advantage of being able to switch themes in a cleaner fashion and avoid potential issues when the currently selected theme is overridden by a Global Deisgn template setting.

To keep things simple most of the CSS blocks used below can be pasted into section one (the common css section) of your theme. If you want to use different styles for different Site default page layouts just put the CSS in the relevent section. eg. the sections in your theme One Column, Two Column etc.

NOTE: The default Site Page Layout is specified from the Design Template (under Installation Settings from the profile page) and can be overriden at page level from a webpage.

1: How to add the page shadow

Easy this one, paste the the following CSS into section one of your Theme. This is the common CSS section.



.headermargin
{
background-image: url("../_images/dropshadow.png");
margin: auto;
width: 970px
}

.dropshadowbottom
{
display:block !important;
}


2: How to Remove the page shadow

Paste the following CSS into section one of your Theme.


.dropshadow
{
background-image:none;
}

.dropshadowbottom{display:none !important;}



3: How to turn the clock ON

Paste the following into section 8 of your Theme


$(document).ready(function()
{
SystemClockOn();
});



4: Turn the clock OFF

Paste the following into section one of your Theme.


divClockContainer{display:none;}


5: Set the webpage Title color

Paste the following into section one of your theme. Replace the question marks with the hex colour of your choice.


h1
{
color #?????? !important;
}


6: Set the Dashboard Title Text colour

Paste the following into section one of your theme.Replace the question marks with the hex colour of your choice.


.panel-title h2
{
color #?????? ;
}


7: Set the menu colours

Step 1: Paste the following CSS into section one of your theme.

Step2: Replace each of the following codes (e.g. menuBC, menuTC etc) with the hex colour of your choice, so for example replace menuBC with #ffffff to set the menu background color to White.

Ensure all the following codes have been replaced, or the menu won't look correct.

menuBC - menu background color
menuTC - menu text color
menuHB - menu Hover background color
menuHT - menu Hover text color

.jqueryslidemenu ul li a
{
background-color: menuBC !important;
color: menuTC !important;
}

.jqueryslidemenu ul
{
background-color: menuBC !important;
}

.jqueryslidemenu ul li a:hover
{
background-color: menuHB !important;
color: menuHT !important;
}

and the same for the other menu...

.jqueryslidemenu2 ul li a
{
background-color: menuBC !important;
color: menuTC !important;
}

.jqueryslidemenu2 ul
{
background-color: menuBC !important;
}

.jqueryslidemenu2 ul li a:hover
{
background-color: menuHB !important;
color: menuHT !important;
}
.menu li a
{
background-color: menuHB !important;
}

ul.menu li
{
margin-top: 0px;margin-bottom: 0px
}


8: Change the Footer text and background colors

Step 1: Paste the following CSS into section one of your theme.

Step2: Replace each of the following codes (e.g. menuBC, menuTC etc) with the hex colour of your choice, so for example replace footerTC with #ffffff to set the footer text color to White.

Ensure all the following codes have been replaced, or the footer won't look correct.

footerTC - footer text color
footerBC - footer background color

.footer a
{
color: #footerTC !important;
background: #footerBC !important;
}
.footer
{
color: #footerTC !important;
background: #footerBC !important;
}

.footer a:hover
{
color: #footerTC !important;
background: #footerBC !important;
}


9: Set the Footer image

The footer bar can be a colour or an image, use the previous section to define the colours, this section details how to define an image.


.footer
{
background-color:transparent !important;
background-image:url("../_images/uploads/footer_mycolor2.jpg") !important;
color:black !important;
}


10: Set the System buttons images and Style

The buttons in your website can easily be changed. There are two standard buttons a large and a small one, the small is used for search and browse functions. The images suggested size is 98px x 24px though you can use whatever size you prefer.

To change the images paste the following CSS into section one of your theme.


.button
{
background-image:url("../_images/btn2-normal-darkgray.png") !important;
color: white !important;
}

.button:hover
{
background-image:url("../_images/btn2-over-darkgray.png") !important;
color: white !important;
}

.smallbutton
{
background-image:url("../_images/minibutton-darkgray.png") !important;
color: white !important;
}

.smallbutton:hover
{
background-image:url("../_images/minibutton-normal-darkgray.png") !important;
color: white !important;
}


Site header image, HTML or Object Code

Moving your default site image to the theme is straight forward but there are a couple of scenario considerations.

SCENARIO 1: Your Site header is simply an image.

Step 1: You will need a HTML image element to hold your image, copy the following into section 7 ( addtional html ) of your theme.

NOTE: The src attribute (below) has been left blank and is set instead in step 2. Setting the src of the image in this way signals to the function to automatically assign the correct height to the image elemant.

<img  alt = "" style = "display:none;" id = "imgHeader2" class = "imgHeader2" src = "" /> 


Step 2: Then in section 8 just inside your opening script block add the following...

<script  type = "text/javascript">  
   resolveImageHeader("imgHeader2",-1,"/_images/uploads/mythemes/mythemename/myimagename.jpg");   
</script>



Here we call the built in function resolveImageHeader().  This takes 3 parameters.

parameter 1: The id of the elemant to move to the Header image location. This can be any HTML elemant, in scenario 1 it is an image with the id imgHeader2.

parameter 2: custom height, in pixels.  If you want to specify a custom fixed height height for the Header area set this here, use pixels. If you are using scenario 1 ( a simple image ) then set to -1, this signals to the resolveImageHeader() function to auto set the height of the Header area to be the height of the specified image.

parameter 3: Path of the image to use.   NOTE: Here we are using the built in / command which returns resolves to the your website root followed by a forward slash. This can be used in section 7 and 8 of your themes. The file manager and image browser feautes in dreamgenie have permission to access to /_Images/uploads, you may not navigate beyond that point as these areas contain system files.

SCENARIO 2: Header image contains html and or flash, which may or may not include an image elemant.

Step 1 : Calculate the height of your header. The only real difference between scenario 1 and 2 is that you prvide the height of the Header, this is the outcome of using freeform HTML and or Flash in the header.  To obtain the height of the header; at the most simplest level you could just run the page and use tools such as the ruler in IE 7 developer tools or Firefox firebug.

Step 2 : Place your HTML and or Flash into section 7 (additional HTML) of your theme, for example.

<div id="divImgChild">  
<div id="divTitleText" class="divTitleText">  
   <div class="h1TitleText">  
      <div class="divTitleSubA">  
         <style="color:white;" title="DREAMGenie | World Class Web Builder and CMS" href="/" target="_self">  
         <span class="spTitleTextA">dream</span> 
         <span class="spTitleTextAb">genie</span> 
         </a> 
         <div style="clear:both;font-size:1px;line-height:1"</div> 
         <span class="spTitleTextD">CMS and Website Builder</span> 
      </div> 
      <div class="divTitleSubB">  
         <span class="spTitleTextE" style="float:right;"><style="color:white;" title="You can contact Dreamgenie on 01392 202078" href="/contact-us.aspx" target="_self">contact us</a></span>  
         <div style="clear:both;font-size:1px;line-height:1"</div> 
         <span class="spTitleTextC">+44 (0)1392 202078</span> 
      </div> 
    </div> 
    <div class="divcarouselsep" style="clear:both;font-size:1px;line-height:1"</div> 
</div> 
<div id="carousel" class="carousel" style="width:100%;text-align:center;">  
<img  class="notcarousel1" src="/_images/uploads/content/leapx-ahead.gif"/>   
</div> 
</div> 


We recommend using a wrapper outer div for your html or flash. In our example the id is divImgChild. The remaining html above is not required and could be any HTML or flash.

Step 2: Add the following to section 8 (additional javascript) of your theme.

resolveImageHeader("divImgChild",80,""); 

The above Javascript calls the internal function resolveImageHeader() function passing wrapper div id as the first parameter, this will be set to display block and inline.  Immediatley afterwards the height of the Header will be set to that provided in parameter 2, in this case 80px.

NOTE: The height as provided in param 2 is set on the physical dreamgenie element for the Header area which is #ctl00_divImage and not the wrapper div divImgChild in the example above.
 


Visit the blog archive »

You are welcome to post a comment


To Verify You are Human!
Please enter the code above:

Previous Comments

None