[MODX] 1. Template *

时间:2024-01-03 14:40:14

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

[MODX] 1. Template *

There are some build-in placeholder:

[MODX] 1. Template *