【发布时间】:2017-11-02 09:57:47
【问题描述】:
我有一个创建页脚区域的网站。这将由两个块组成,一个与页脚的左侧对齐,另一个与右侧对齐。我正在使用 Bootstrap,因此每个块都包含在必要的 HTML 中来描述两列。
我的问题是,我怎样才能将特定的块包装在他们自己的 HTML 中而不在 Drupal 的块编辑器中公开它(以避免用户删除 HTML)。
这是我的 HTML 示例;
<!-- Start: Footer -->
<footer>
<div class="container">
<!-- {{ content }} would be inserted here -->
<!-- Start: Footer menu -->
<div class="col-xs-12 col-sm-8">
<img src="/images/logo.png" class="logo">
<ul class="links">
<li><a href="#">FAQS</a></li>
<li><a href="#">RESOURCES</a></li>
<li><a href="#">RETURN TO MAIN SITE</a></li>
</ul>
</div>
<!-- End: Footer menu -->
<!-- Start: Social media links block -->
<div class="col-xs-12 col-sm-4">
<p>Connect with us:</p>
<ul class="social">
<li><a href="#"><span class="fa fa-twitter"></span></a></li>
<li><a href="#"><span class="fa fa-facebook"></span></a></li>
<li><a href="#"><span class="fa fa-linkedin"></span></a></li>
<li><a href="#"><span class="fa fa-google-plus"></span></a></li>
</ul>
</div>
<!-- End: Social media block -->
</div>
</footer>
<!-- End: Footer -->
【问题讨论】: