We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22537
    • 78 Posts
    Inspiration took me and I created a live site where anyone can take part.

    ----The purpose to create a web site where anyone can contribute.
    To share the progress through simple how-tos with the rest of the community, by posting these how tos - step by step procedures here on this thread.

    Helping each other learn more so we can create our own web sites by what we learned.
    For me a way to get out of frustration with what I still do not know to arrive at a better place.
    ----



    I did a fresh install of Modx 2.0.3. earlier today.

    http://sunwindproduction.com/modx/manager/

    Send me a PM or e-mail and I’ll give you the login info.



    Purpose is to create a sample site out of an existing web site which is in need of a major makeover.

    http://www.spirituellfilm.no/ - Oslo Spiritual Filmclub. Is a film club I volunteer my time. We hold screenings once a month at a cinema here in Oslo. The main focus of the web site is to bring news about the next screening (månedens film), help people to reserve a ticket (Påmelding), send out newsletters about the screening (nyhetsbrev), News (siste nytt) and the film archive over screened movies (arkiv).

    So what the site needs is a layout overhaul.
    This months movie page. Possibly giving people the chance to give comments below the movie info.
    Somekind of database for movies we have shown. Or a way to better create an film archive system.
    A good way for people to reserve a ticket. Or possibly purchase a ticket.
    A good way for people to signup for the newsletter. A good way for us to send out newsletters.
    A contact form.
    A blog type page for the news section.
    An easy way to translate the page from Norwegian to English.

    Possibly a new forum.

    The different pages as the menu structure is today.
    Velkommen - Welcome page
    Om OSF - about the club
    Månedens film - movie of the month
    Påmelding - reserve a ticket.
    Medlemskap - Membership info
    Nyhetsbrev - signup for the newsletter
    Siste Nytt - News
    Arkiv - Movie archive of past screened movies.
    Forumet - an old forum not in use any longer.
    Kontakt - Contact.

    I am open for ideas. It would be a lot of fun if people would like to take part.

    Please post here at the forum.
    Please also take notes along the way and share them here since we need to document the procedure. For this site is meant as a tutorial site as well as a live site so everyone can learn from our progress. We need simple step-by-step tutorials making it simple for anyone to follow.

    Have a great day! I look forward to seeing how this will go.
    I’ll slowly begin.
      • 1169
      • 312 Posts
      As I mentioned on previous post I would like to use the Left 2 column template from:-
      http://matthewjamestaylor.com/blog/perfect-2-column-left-menu.htm

      And also include the TV’s from:-
      http://jgulledge.wordpress.com/2010/06/26/learning-modx-tutorial-1-creating-a-template/

      I have already downloaded perfect-2-column-left-menu

      I can start when you say GO for IT grin grin

        DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
        • 22537
        • 78 Posts
        Go go go for it!....:)
          • 1169
          • 312 Posts
          I have downloaded the code for the Left 2 column Template
          <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
          <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-GB">
          <head>
          	<title>The Perfect 2 Column Liquid Layout (left menu): No CSS hacks. SEO friendly. iPhone compatible.</title>
          	<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
          	<meta name="description" content="The Perfect 2 Column Liquid Layout (left menu): No CSS hacks. SEO friendly. iPhone compatible." />
          	<meta name="keywords" content="The Perfect 2 Column Liquid Layout (left menu): No CSS hacks. SEO friendly. iPhone compatible." />
          	<meta name="robots" content="index, follow" />
          	<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
          	<link rel="stylesheet" type="text/css" href="screen.css" media="screen" />
          </head>
          <body>
          
          <div id="header">
          	<p><a href="http://matthewjamestaylor.com/blog/perfect-multi-column-liquid-layouts" title="Perfect multi-column liquid layouts - iPhone compatible">« Back to the CSS article</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a></p>
          	<h1>The Perfect 'Left Menu' 2 Column Liquid Layout (Percentage widths)</h1>
          	<h2>No CSS hacks. SEO friendly. No Images. No JavaScript. Cross-browser & iPhone compatible.</h2>
          	<ul>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-3-column.htm">3 Column <span>Holy Grail</span></a></li>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-3-column-blog-style.htm">3 Column <span>Blog Style</span></a></li>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-2-column-left-menu.htm" class="active">2 Column <span>Left Menu</span></a></li>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-2-column-right-menu.htm">2 Column <span>Right Menu</span></a></li>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-2-column-double-page.htm">2 Column <span>Double Page</span></a></li>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-full-page.htm">1 Column <span>Full Page</span></a></li>
          		<li><a href="http://matthewjamestaylor.com/blog/perfect-stacked-columns.htm">Stacked <span>columns</span></a></li>
          	</ul>
          	<p id="layoutdims">Measure columns in: <a href="http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-pixels.htm">Pixel widths</a> | <a href="http://matthewjamestaylor.com/blog/ultimate-2-column-left-menu-ems.htm">Em widths</a> | <strong>Percentage widths</strong></p>
          </div>
          <div class="colmask leftmenu">
          	<div class="colleft">
          		<div class="col1">
          			<!-- Column 1 start -->
          			<h2>Percentage dimensions of the left menu layout</h2>
          			<img src="http://matthewjamestaylor.com/blog/perfect-2-column-left-menu-dimensions.gif" width="350" height="370" alt="Two column left menu layout dimensions" />
          			<p>All the dimensions are in percentage widths so the layout adjusts to any screen resolution. Vertical dimensions are not set so they stretch to the height of the content.</p>
          			<h3>Maximum column content widths</h3>
          			<p>To prevent wide content (like long URLs) from destroying the layout (long content can make the page scroll horizontally) the column content divs are set to overflow:hidden. This chops off any content that is wider than the div. Because of this, it's important to know the maximum widths allowable at common screen resolutions. For example, if you choose 800 x 600 pixels as your minimum compatible resolution what is the widest image that can be safely added to each column before it gets chopped off? Here are the figures:</p>
          			<dl>
          				<dt><strong>800 x 600</strong></dt>
          				<dd>Left column: 162 pixels</dd>
          				<dd>Main page: 550 pixels</dd>
          				<dt><strong>1024 x 768</strong></dt>
          
          				<dd>Left column: 210 pixels</dd>
          				<dd>Main page: 709 pixels</dd>
          			</dl>
          			<h2>The nested div structure</h2>
          			<p>I've colour coded each div so it's easy to see:</p>
          			<img src="http://matthewjamestaylor.com/blog/perfect-2-column-left-menu-div-structure.gif" width="350" height="369" alt="Two column left menu layout nested div structure" />
          			<p>The header, colmask and footer divs are 100% wide and stacked vertically one after the other. Colleft is inside colmask. The two column content divs (col1 & col2) are inside colleft. Notice that the main content column (col1) comes before the side column.</p>
          			<!-- Column 1 end -->
          		</div>
          		<div class="col2">
          			<!-- Column 2 start -->
          			<div id="ads">
          				<a href="http://matthewjamestaylor.com">
          					<img src="mjt-125x125.gif" width="125" border="0" height="125" alt="Art and Design by Matthew James Taylor" />
          				</a>
          			</div>
          			<h2>No CSS hacks</h2>
          			<p>The CSS used for this layout is 100% valid and hack free. To overcome Internet Explorer's broken box model, no horizontal padding or margins are used. Instead, this design uses percentage widths and clever relative positioning.</p>
          			<h2>SEO friendly 2-1 column ordering</h2>
          
          			<p>The higher up content is in your page code, the more important it is considered by search engine algorithms (see my article on <a href="http://matthewjamestaylor.com/blog/link-source-ordering-seo">link source ordering</a> for more details on how this affects links). To make your website as optimised as possible your main page content must come before the side columns. This layout does exactly that: The the right-hand main page comes first, then the left column (see the nested div structure diagram for more info). The columns can also be configured in the opposite order if required.</p>
          			<h2>Full length column background colours</h2>
          			<p>In this layout the background colours of each column will always stretch to the length of the longest column. This feature was traditionally only available with table based layouts but now with a little CSS trickery we can do exactly the same with divs. Say goodbye to annoying short columns! You can read my article on <a href="http://matthewjamestaylor.com/blog/equal-height-columns-cross-browser-css-no-hacks">equal height columns</a> if you want to see how this is done.</p>
          			<h2>No Images</h2>
          
          			<p>This layout requires no images. Many CSS website designs need images to colour in the column backgrounds but that is not necessary with this design. Why waste bandwidth and precious HTTP requests when you can do everything in pure CSS and XHTML?</p>
          			<h2>No JavaScript</h2>
          			<p>JavaScript is not required. Some website layouts rely on JavaScript hacks to resize divs and force elements into place but you won't see any of that nonsense here.</p>
          			<h2>Resizable text compatible</h2>
          			<p>This layout is fully compatible with resizable text. Resizable text is important for web accessibility. People who are vision impaired can make the text larger so it's easier for them to read. It is becoming increasingly more important to make your website resizable text compatible because people are expecting higher levels of web accessibility. Apple have made resizing the text on a website simple with the pinch gesture on their multi-touch trackpad. So far this trackpad is only available on the MacBook Air but it will soon be rolled out to all of their systems. Is your website text-resizing compatible?</p>
          			<h2>No Quirks Mode</h2>
          
          			<p>This liquid layout does not require the XML declaration for it to display correctly in older versions of Internet Explorer. This version works without it and is thus never in quirks mode.</p>
          			<h2>No IE Conditional Comments</h2>
          			<p>Only one stylesheet is used with this layout This means that IE conditional comments are not needed to set extra CSS rules for older versions of Internet Explorer.</p>
          			<h2>Browser Compatibility</h2>
          			<p>This left menu liquid Layout has been tested on the following browsers:</p>
          			<h3>iPhone & iPod Touch</h3>
          
          			<ul>
          				<li>Safari</li>
          			</ul>
          			<h3>Mac</h3>
          			<ul>
          				<li>Safari</li>
          				<li>Firefox</li>
          
          				<li>Opera 9.25</li>
          				<li>Netscape 9.0.0.5 & 7.1</li>
          			</ul>
          			<h3>Windows</h3>
          			<ul>
          				<li>Firefox 1.5, 2 & 3</li>
          
          				<li>Safari</li>
          				<li>Opera 8.1 & 9</li>
          				<li>Google Chrome</li>
          				<li>Explorer 5.5, 6 & 7</li>
          				<li>Netscape 8</li>
          
          			</ul>
          			<h2>Valid XHTML strict markup</h2>
          			<p>The HTML in this layout validates as XHTML 1.0 strict.</p>
          			<h2>This layout is FREE for anyone to use</h2>
          			<p>That's right, you don't have to pay anything. If you are feeling generous however, link back to my demo page so other people can find and use this layout too.</p>
          			<h2>Centered menus compatible</h2>
          
          			<p>This layout is fully compatible with my <a href="http://matthewjamestaylor.com/blog/beautiful-css-centered-menus-no-hacks-full-cross-browser-support">cross-browser compatible centered menus</a>.</p>
          			<!-- Column 2 end -->
          		</div>
          	</div>
          </div>
          <div id="footer">
          	<p>This page uses the <a href="http://matthewjamestaylor.com/blog/perfect-2-column-left-menu.htm">Perfect 'Left Menu' 2 Column Liquid Layout</a> by <a href="http://matthewjamestaylor.com">Matthew James Taylor</a>. View more <a href="http://matthewjamestaylor.com/blog/-website-layouts">website layouts</a> and <a href="http://matthewjamestaylor.com/blog/-web-design">web design articles</a>.</p>
          </div>
          
          </body>
          </html>
          


          And the CSS
          body {
          	margin:0;
          	padding:0;
          	border:0;			/* This removes the border around the viewport in old versions of IE */
          	width:100%;
          	background:#fff;
          	min-width:600px;    	/* Minimum width of layout - remove line if not required */
          					/* The min-width property does not work in old versions of Internet Explorer */
          	font-size:90%;
          }
          a {
          	color:#369;
          }
          a:hover {
          	color:#fff;
          	background:#369;
          	text-decoration:none;
          }
          h1, h2, h3 {
          	margin:.8em 0 .2em 0;
          	padding:0;
          }
          p {
          	margin:.4em 0 .8em 0;
          	padding:0;
          }
          img {
          	margin:10px 0 5px;
          }
          #ads img {
          	display:block;
          	padding-top:10px;
          }
          
          /* Header styles */
          #header {
          	clear:both;
          	float:left;
          	width:100%;
          }
          #header {
          	border-bottom:1px solid #000;
          }
          #header p,
          #header h1,
          #header h2 {
          	padding:.4em 15px 0 15px;
          	margin:0;
          }
          #header ul {
          	clear:left;
          	float:left;
          	width:100%;
          	list-style:none;
          	margin:10px 0 0 0;
          	padding:0;
          }
          #header ul li {
          	display:inline;
          	list-style:none;
          	margin:0;
          	padding:0;
          }
          #header ul li a {
          	display:block;
          	float:left;
          	margin:0 0 0 1px;
          	padding:3px 10px;
          	text-align:center;
          	background:#eee;
          	color:#000;
          	text-decoration:none;
          	position:relative;
          	left:15px;
          	line-height:1.3em;
          }
          #header ul li a:hover {
          	background:#369;
          	color:#fff;
          }
          #header ul li a.active,
          #header ul li a.active:hover {
          	color:#fff;
          	background:#000;
          	font-weight:bold;
          }
          #header ul li a span {
          	display:block;
          }
          /* 'widths' sub menu */
          #layoutdims {
          	clear:both;
          	background:#eee;
          	border-top:4px solid #000;
          	margin:0;
          	padding:6px 15px !important;
          	text-align:right;
          }
          /* column container */
          .colmask {
          	position:relative;	/* This fixes the IE7 overflow hidden bug */
          	clear:both;
          	float:left;
          	width:100%;			/* width of whole page */
          	overflow:hidden;		/* This chops off any overhanging divs */
          }
          /* common column settings */
          .colright,
          .colmid,
          .colleft {
          	float:left;
          	width:100%;
          	position:relative;
          }
          .col1,
          .col2,
          .col3 {
          	float:left;
          	position:relative;
          	padding:0 0 1em 0;
          	overflow:hidden;
          }
          /* 2 Column (left menu) settings */
          .leftmenu {
          	background:#fff;		/* right column background colour */
          }
          .leftmenu .colleft {
          	right:75%;			/* right column width */
          	background:#f4f4f4;	/* left column background colour */
          }
          .leftmenu .col1 {
          	width:71%;			/* right column content width */
          	left:102%;			/* 100% plus left column left padding */
          }
          .leftmenu .col2 {
          	width:21%;			/* left column content width (column width minus left and right padding) */
          	left:6%;			/* (right column left and right padding) plus (left column left padding) */
          }
          /* Footer styles */
          #footer {
          	clear:both;
          	float:left;
          	width:100%;
          	border-top:1px solid #000;
          }
          #footer p {
          	padding:10px;
          	margin:0;
          }


          I then create a directory under assets named ’templates’ and another two directories under that called ’css’ & ’images’

          Dir Structure
          assets
          templates
          css
          images

          I then create a file screen_l2c.css and place above css Code in file. Save File in assets/templates/css

          I then create a template in Elements name ’Left 2 Column’ and copy and paste downloaded code in Template code. Save

          All that remains is to change 1 line of code to point point to our CSS.
          In head tags 10 lines from top of Code
          	<link rel="stylesheet" type="text/css" href="screen.css" media="screen" />


          Change too
          	<link rel="stylesheet" type="text/css" href="assets/templates/css/screen_l2c.css" media="screen" />


          I have not deleted any of the code so should have an exact replica of original template.

          All that remains is to set Home Page to new Template

          Go to Resources select Home and change template to ’Left 2 Column’ Save and then Preview Site.

          This worked for me on localhost

          Does anyone know how to get the code with highlighting from say Netbeans or Notepad++?


          EDIT
          You can view changes to file http://github.com/allanjpb/Oslo
            DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
            • 1169
            • 312 Posts
            I just want to say UPFRONT this would not have been possible without the work of others who have given freely of their time and experience to help others on there way to MODx enlightenment. I am somewhat afraid to make a list and also in what order in case I offend anyone but please forgive me if I have left you off this list

            Mary @einsteinsboi http://codingpad.maryspad.com
            Bob Ray @BobRay http://bobsguides.com/MODx.html
            Susan Ottwell @sottwell http://www.sottwell.com

            These have been the main source of my knowledge but there have been many others.
            Getting a little old but will find them and post back here

            http://modxdeveloper.com/
            http://modxrules.com/
              DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
              • 22537
              • 78 Posts
              Man it is great to get this project going!

              I have been busy with other things for the last few hours, and I’ll get back to this tomorrow!

              Thank you Allan for your awesome magnificent willingness to help out with this!!
                • 22537
                • 78 Posts
                We need to begin with the basics, as simple as possible. Think of it like teaching someone math for the first time. It has to be very simple. One begins by teaching plus + and minus - probably in first grade. That is level 1. Everyone starts on level 1 when they begin with something new.

                For us in creating this project. Level 1 is creating a very simple html template page with an external styles.css.
                I am working on it right now, and writing down the steps along the way. Also doing some screencasting for later editing.
                I will also create some pages that use the simple template.

                I’ll get back to level 2 later today.

                Thanks Allan!