[MODX] 1. Template *

After uploading javascript, css and images to the assets folder.

We try to use Template to customize our html.

 

First template: We set up some placeholder ([[*longtitile]], [[*content]]) in our template.

<body>
    <div class="site">

      <!-- Header -->

      <header class="group">
        <div class="logo">
          <h1>
            [[*longtitle]]
          </h1>
        </div>
        <nav>
          <ul>
            <li class="active"><a href="#">Home</a></li>
            <li><a href="#">Services</a></li>
            <li><a href="#">About Us</a></li>
            <li><a href="#">Sign Up</a></li>
          </ul>
        </nav>
      </header>

      <!-- Banner -->

      <section class="banner">
        <div class="banner-caption">
          <h2>A Whole New World</h2>
          <p>Come explore like never before!</p>
        </div>
      </section>

      [[*content]]

      <!-- Footer -->

      <footer>
        <!-- ... -->
      </footer>

    </div>
  </body>

 

Those placeholder will be replace by the document (html):

 

There are some build-in placeholder:

 

posted @ 2014-12-19 19:32  Zhentiw  阅读(165)  评论(0编辑  收藏  举报