如何在Weebly模板中添加新部分 [英] How to add a new section in Weebly template

查看:129
本文介绍了如何在Weebly模板中添加新部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编辑标题类型,使其具有4个静态部分,编辑器可以在其中拖放新字段.

I would like to edit a header type so that it would have 4 static sections in which the editor can drag and drop new fields.

此模板目前只有以下内容;

The template has only the following at the moment;

 <div class="main-wrap">
  {{#sections}}
      <div class="container">{content}</div>
  {{/sections}}
</div>

我有什么办法像这样复制主容器吗?

Is there any way for me to multipy the main container like this way?

 <div class="main-wrap">
  {{#sections}}
      <div class="container">{content}</div>
  {{/sections}}
</div>

 <div class="main-wrap2">
  {{#sections}}
      <div class="container">{content}</div>
  {{/sections}}
</div>

 <div class="main-wrap3">
  {{#sections}}
      <div class="container">{content}</div>
  {{/sections}}
</div>

 <div class="main-wrap4">
  {{#sections}}
      <div class="container">{content}</div>
  {{/sections}}
</div>

我不确定我应该给什么,而不是给那些额外的{content}.因为只要它们具有{content}标记,它就会复制第一部分的内容.

I am just not sure what I should give instead of {content} for the extra ones. Because as long as they have {content} tag, it is replicating the content of the first section.

有什么想法可以使它起作用吗? 我的目的是为每个部分单独指定特定的样式.

Any idea how I can make it work? My purpose is to give specific styles to each section indvidually.

推荐答案

首先,让我指出,{{#sections}}允许您通过将section元素拖到内容区域来创建多个部分.每个部分都可以有自己的样式"或背景.这样一来,实际上就不需要单独的内容区域,除非它们不是彼此堆叠的统一区域.

First, let me point out that {{#sections}} allows you the ability to create multiple sections, by dragging the section element into the content area. Each section can have its own 'style' or background. With that there isn't really any need for separate content areas, that is unless they are not uniform areas stacked on top each other.

所以,您真正需要的是..

So, all you really need is..

 <div class="main-wrap">
  {{#sections}}
      <div class="container">{content}</div>
  {{/sections}}
</div>





话虽如此,如果您仍然想继续执行您的计划,则可以对包括 global ="false" 在内的其他内容区域使用唯一的内容标签. global ="false"表示使用页面类型的内容不会显示在其他页面上.

That being said, if you would still like to continue with your plan, you would use unique content tags for the additional content areas including global="false". global="false" means that the content will not appear on other pages using the page type.

示例{content2:content global="false"}

 <div class="main-wrap">
    <div class="container">{content}</div>
 </div>

 <div class="main-wrap2">
    <div class="container">{content2:content global="false"}</div>
 </div>

 <div class="main-wrap3">
    <div class="container">{content3:content global="false"}</div>
 </div>

 <div class="main-wrap4">
    <div class="container">{content4:content global="false"}</div>
 </div>

请注意,我删除了部分",因为我不确定您是否真的想要每个区域.

Note that I removed the 'sections' because I wasn't sure if you really wanted that for each area.

这篇关于如何在Weebly模板中添加新部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆