首页 > 代码库 > [MODX] 1. Template

[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:

技术分享

 

[MODX] 1. Template