Basic MODx Template

MODx Templates are easy and even fun!

Templates are managed under the Resources Tab in MODx admin. Here's how:

  • Create a New Template and give it a name (myTemplate)
  • Paste in your HTML (here's a simple example)


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>Simple MODx Template</title>
    <link rel="stylesheet" type="text/css" href="style.css" />
    </head>
    <body>
    <div id="banner"><h1>Logo</h1></div>
    <div id="wrapper">
    <div id="container">
    <div id="content">
    Put your content in here...
    </div>
    </div>
    <div id="sidebar">
    Sidebar content goes here...
    </div>
    <div class="clearing"> </div>
    </div>
    <div id="footer">
    Footer goes here
    </div>
    </body>
    </html>

  • Make yourself a stylesheet like so:


    body { margin: 20px; background: white; }
    #banner { background: #f1f1f1; border:1px solid #999;}
    #banner h1 { padding:10px; }
    #wrapper { border-left: 1px solid #ccc; border-right:1px solid silver; }
    #container { width: 100%; float: left; margin-right: -200px; }
    #content { margin-right: 200px; height:200px; border-right:1px dotted silver; }
    #sidebar { width: 200px; float: right; }
    #footer { background: #cdcdcd; border:1px solid silver;}
    .clearing { clear:both; height:0; }

  • Save your stylesheet as per the location in the stylesheet tag: <link rel="stylesheet" type="text/css" href="style.css" />

.
From there you should be able to work with the HTML of your new template though the admin and by editing the CSS.




Was that helpful?

Here are some free modx templates

Also see:
http://www.openwebdesign.org
Open Web Design is a community of designers and site owners sharing free web design templates as well as web design information. Helping to make the internet a prettier place!

Basic MODx template

Hi, rimian,

Are you interested in looking at my needs for a kickstart to converting to MODx.

Scope details at our autoresponder, help at peterwade dot com. Your email address is not visible to us.

I'm from Adelaide, by the way.

Cheers,
Peter

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options