Page 1 of 1

Help with global blocks please [SOLVED]

Posted: Mon Apr 06, 2009 9:46 pm
by Podman
Hello, I'm a newbie to CMSms and I make no bones about it, I'm pulling my hair out.

I've taken a web page, entered the hole code from between the tags as content.  Then I've gone and added teh rest to a template, putting some java (which is used for a flash menu system) between {literal}{/literal} tags.

All seemed well othe than the menus just don't work.  Then I started to try and break teh page down into sections using gglobal blocks.  I cut out the header code and stuck that in a block called header then used the given tag to put it as teh first thing in the body in the template.  Then I cut out the footer code (from div to /div) and stuck that in a block too and put that after the {content} tag before the closing body tag.

Apart from my flash menu system not working it appears anything I put in global blocks doesn't get teh css layout, everything inside the conent page is css formatted fine so I know eth template is using teh css.  I got this far on a much more complex website and thought I was biting off more than I coudl chew so I chose a simpler site to try it on and got stuck at the same point.


What am I doing wrong please?

The code of the actual page I am trying to practice on is as follows 



From here to body (not including) into the template with {literal}{/literal} surrounding the two java scripts as one.

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Shalom House - St Davids Pembrokeshire, Wales</title>
<link href="css/shalom.css" rel="stylesheet" type="text/css"/>
<__script__ type="text/javascript" src="includes/Creative Menus/menuDisplay.js"></__script>
<__script__ type="text/javascript" src="includes/Creative Menus/swfobject.js"></__script>
</head>

</__body>
From here to content wrapper tag header global block in appropriate area after body in template

Code: Select all

<div id="outerWrapper">
  <div id="header">
    <p><img src="images/shalomlogo.gif" width="498" height="171" alt="shalom Logo" /></p>
    <p><img src="images/details.jpg" alt="details" name="details" width="500" height="38" border="0" usemap="#detailsMap" id="details"/>
      <map name="detailsMap" id="detailsMap">
        <area shape="rect" coords="131,17,294,37" href="mailto:info@shalomstdavids.org" target="_blank" alt="E-mail" />
        <area shape="rect" coords="317,16,481,37" href="../" target="_blank" alt="Home" />
      </map>
    </p>
  </div>
  <div id="topNavigation">
    <!-- Creative menu Shalom begin -->
    <div id="CMPH_Shalom"> <img src="includes/Creative Menus/spacer.gif" width="660" height="40" alt="spacer"/></div>
    <div id="creative_menu_Shalom" menu_type="H" name="Shalom" >
      <div id="menu_holder_Shalom">
        <div id="menu_options" totalwidth="660" totalheight="40" fittopage="false" skin="LG Style" skincustom="" skinfiles="" mainColors="#4EC4EA,#7685C2" subColors="#4EC4EA,#7685C2" resizeOptions="" cutRoundCorners="false">
          <div id="main_menu" mainButPos="Center,0"  mainButResize="fit to largest text" ></div>
          <div id="main_button" mainButSpacing="4" mainBESettings="MiddleRevealH,8" mainButReverse="true"  mainArrow="0,0" showMainArrow = "false" mainMinSize="0" ></div>
          <div id="main_text" mainFont="Calibri,14"  mainUpFmt="#FFFFFF,,bold,"  mainOverFmt="#FFFFFF,bold,,"  mainDownFmt="#FFFFFF,bold,,"  mainHTSettings="Center,2" mainVTSettings="Top,18" mainHTSpace="9" ></div>
          <div id="sub_menu" subButPos="Middle,15" subMESettings="FreeSlideV,5" subLMESettings="Fade,6"  hSubMenuAlign="Center" subMenuReverse="true" openEvent="Rollover" delays="6,5" hSubOverlap="0" vSubOverlap="0" subMinSize="0" submenualpha="100" fixalphatext="true"></div>
          <div id="sub_button" subButSpacing="2"  subBESettings="FadeRevealDown,8" subButReverse="true" showSubArrow = "false" subArrow="" subButResize="fit to largest text" ></div>
          <div id="sub_text" subFont="Calibri,14"   subUpFmt="#FFFFFF,bold,,"   subOverFmt="#FFFFFF,bold,," subDownFmt="#FFFFFF,bold,," subHTSettings="Center,10" subVTSettings="Middle,5"  subHTSpace="10" subVTSpace="10" > </div>
        </div>
        <div id="creative_menu_structure" >
          <div><a href="index.htm" target="_parent" level="">Home</a></div>
          <div><a href="#" target="_parent" level="">About Us</a>
            <div><a href="shalom.htm" target="_parent" level=">">Shalom</a></div>
            <div><a href="vision.htm" target="_parent" level=">">Vision</a></div>
            <div><a href="philosophy.htm" target="_parent" level=">">Philosophy</a></div>
            <div><a href="people.htm" target="_parent" level=">">People</a></div>
          </div>
          <div><a href="#" target="_parent" level="">Care & Support</a>
            <div><a href="therapies.htm" target="_parent" level=">">Therapies</a></div>
            <div><a href="facilities.htm" target="_parent" level=">">Facilities</a></div>
            <div><a href="referrals.htm" target="_parent" level=">">Referrals</a></div>
          </div>
          <div><a href="news.htm" target="_parent" level="">News & Events</a></div>
          <div><a href="donate.htm" target="_parent" level="">Donate</a></div>
          <div><a href="contact.htm" target="_parent" level="">Contact Us</a></div>
        </div>
      </div>
    </div>
    <!-- Creative menu Shalom end -->
  </div>

From here to footer tag as Page for content

Code: Select all

  <div id="contentWrapper">
    <div id="back">
      <div id="content">
        <table cellpadding="10">
          <tr>
            <td align="center"><p><span class="header">Welcome to the Shalom House Website</span><br />
              <br />
              Our aim is to provide care and support for adults with life threatening illnesses in Pembrokeshire.<br />
              <br />
              Within our websites pages you will find details  about our<a class="ImLink" href="philosophy.htm"> Philosophy,</a> the <a class="ImLink" href="therapies.htm">Therapies</a> we offer, <a class="ImLink" href="donate.htm">How to donate to our charity</a>, how to <a class="ImLink" href="referrals.htm">refer to us</a> and also how to <a class="ImLink" href="contact.htm">contact us</a> for anything else.</p></td>
          </tr>
        </table>
        <p><img src="images/home_1_01.jpg" alt="Shalom House" width="373" height="239" /></p>
      </div>
    </div>
  </div>
  



From here upto the body (but not including) in a global called footer

Code: Select all

  <div id="footer">
    © Designed and built by <a href="http://www.celticwebsolutions.co.uk">Celtic Web Solutions</a> for Shalom House- St Davids. <br />Registered Charity No 111 7564
</div>
</div>

<!-- Creative Menus - menu rendering scripts start -->
{literal}
<__script__ type="text/javascript"> buildMenu() </__script>
<noscript>
This menu requires JavaScript in order to be properly displayed. Viewing requirements can be found at <a href="www.extendstudio.com">Extend Studio</a> (Flash components and extensions, Dreamweaver extensions, Tools for web design and development)
</noscript>
<!-- Creative Menus - menu rendering scripts end -->{/literal}

<__body>
</__html>

My template reads

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<title>{title}</title>
{stylesheet}
{literal}
<__script__ type="text/javascript" src="includes/Creative Menus/menuDisplay.js"></__script>
<__script__ type="text/javascript" src="includes/Creative Menus/swfobject.js"></__script>{/literal}


</head>


</__body>
    	{global_content name='header'}   

        {content}
 
	{global_content name='footer'}
<__body>
</__html>
I know the template is missing things like the global meta etc etc but tahts due to me deciding to totally wipe it and start again so I was going to put them back in later.  I'm assuming I'm doing something extremely obvious but I just can't see it.

All your help will stop me having a total breakdown so PLEASE HELP!

Lol

Thanks in advance

Pod :)

Re: Help with global blocks please

Posted: Tue Apr 07, 2009 2:09 am
by jmcgin51
Have you read through the CMSMS documentation (http://wiki.cmsmadesimple.org/)?

Global Content Blocks (GCBs) are intended to be used only when you have a block of text that you want to reuse in many places throughout your site (footer text, etc.)  With that said, there really shouldn't be a problem using them as you're doing; it's just probably not the most practical implementation.  But that's ok.

GCBs use the same stylesheets as the rest of your site, as long as you have the right tags (, , etc.) around the text in the GCB.

I would create a simple site - two or three pages - and play around with GCBs, templates, etc.  Once you get a feeling for the way the CMS works, then slowly ease into converting an existing site.

Can you post a link to your test site?

Re: Help with global blocks please

Posted: Tue Apr 07, 2009 7:07 am
by Podman
The site I decided to have a go at converting I uploaded here

Code: Select all

http://www.cmsms.celticwebsolutions.co.uk/

Code: Select all

http://www.cmsms.celticwebsolutions.co.uk/index.php 
is the dogs ear I've made of it so far, I'm going to try and alter it all by just having all the code bar the template as the main template.  I misunderstood what eth blocks were for from using another simple styled cms system.

Re: Help with global blocks please

Posted: Tue Apr 07, 2009 8:37 am
by Podman
Ok I've taken what you said on board and rebuilt it without using blocks and put everything in the template bar teh main content.

All seems to work now thanks.  Just need to look into it all a bit further to se eteh uses of blocks etc because mine woudln't use the CSS they were assigned for some reason.

Thanks again.  Now starts the learning!

Re: Help with global blocks please [SOLVED]

Posted: Mon Apr 13, 2009 10:06 pm
by Dr.CSS
Glad you got it to work but it seems you are going to have a hard time adding pages to the menu dynamically and you may want to look at this...

http://validator.w3.org/check?verbose=1 ... Findex.php

Re: Help with global blocks please [SOLVED]

Posted: Mon Apr 13, 2009 10:10 pm
by Podman
The menu system alone creates about 60 validation errors, this will be updated shortly, it' smainly caused due to all the custom tags.  They'll be gone in a week once the next version of teh software is corrected, as for updating dynamically, it's unlikely really, but I'm not taht bothered because only I will update the menu system once pages are added and I can do it easily enough via teh templates.


Thankyou for all your help :D  Just trying to modify the album module now so that it can use floatbox instead of thickbox.  I'll get there !

Re: Help with global blocks please [SOLVED]

Posted: Mon Apr 13, 2009 10:11 pm
by Podman
oh and I changed teh website totally now to another tester site  www.cmsms.celticwebsolutions.co.uk is now my wifes therapy site taht I built up for her :D