首页 > 其他 > 详细

[MODX] 1. Template

时间:2014-12-19 20:38:07      阅读:288      评论:0      收藏:0      [点我收藏+]

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

原文:http://www.cnblogs.com/Answer1215/p/4174620.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!