我正在尝试在Weebly网站上添加两个{content}区域,这些区域由HTML / CSS编辑器中的自定义代码分隔。我不了解{content}部分在Weebly中如何工作的基本原理。
我最初复制并粘贴:
<section id="wb_sections">
{{#sections}}
<div class="row">
{content}
</div>
{{/sections}}
</section>
但是它只是复制了页面上的内容。
我的大部分搜索工作都陷入僵局。请参见下面的代码。我试图在“投资组合”部分和“页脚”部分之间添加第二个可编辑的(内容拖放){content}部分区域。谢谢您的提前帮助。
<body id="top" class="homepage-sections home-custom-header wsite-theme-light">
<!-- Pre Loader -->
<div id="loading" class="loading"></div>
<div class="wft-layout">
<!-- Main Wrapper -->
<div id="home" class="top">
<!-- Info Bar - Text, Social -->
<div class="info-bar">
<div class="row">
<div class="clearfix">
<div class="info-left">
<ul class="info-links clearfix">
<li><i class="typcn typcn-time"></i>{info:text}</li>
</ul>
</div>
<div class="info-right">
<ul class="info-links clearfix">
<li class="info-social">{social}</li>
</ul>
</div>
</div>
</div>
</div>
<!-- Top Bar & Menu -->
<div class="top-bar">
<!-- Logo, Menu, Cart-->
<div class="header-bar ib-large">
<div class="row d-table">
<div class="eq-col-left pad-0">
{logo}
</div>
<div class="eq-col-right pad-0">
<div class="details-bar">
<div class="row">
<div class="clearfix">
<div class="details-right">
<ul class="details-links clearfix">
<li class="t-address"><i class="typcn typcn-location-outline"></i>{details-address:text}<br>
<span>{detail-address:text}</span>
</li>
<li class="t-phone"><i class="typcn typcn-phone-outline"></i>{details-phone:text}<br>
<span>{detail-phone:text}</span>
</li>
<li class="t-email"><i class="typcn typcn-mail"></i>{details-email:text}<br>
<span>{detail-email:text}</span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div id="menu-container" class="menu-container">
<div class="row">
<span id="cart">{minicart}</span>
<!-- Menu Toggle -->
<input type="checkbox" id="toggle" />
<label for="toggle" class="toggle"></label>
<!-- Menu -->
<div class="menu relative">
<div class="nm-inner">
<!-- Scroller Menu Items -->
<div id="scroller-nav">
<ul id="nav">
<li class="home-nav"><a href="#home" class="home-nav current">{menu1:text}</a></li>
<li class="sec1-nav"><a href="#section-one" class="sec1-nav">{menu2:text}</a></li>
<li class="sec2-nav"><a href="#section-two" class="sec2-nav">{menu3:text}</a></li>
<li class="sec3-nav"><a href="#section-three" class="sec3-nav">{menu4:text}</a></li>
<li class="sec4-nav"><a href="#section-four" class="sec4-nav">{menu5:text}</a></li>
<li class="sec5-nav"><a href="#section-five" class="sec5-nav">{menu6:text}</a></li>
<li class="blog-nav"><a href="/blog.html" class="blog-nav">{menu7:text}</a></li>
<li class="features-nav"><a href="/features.html" class="features-nav">{menu8:text}</a></li>
</ul>
</div>
<!-- Multi Page Menu -->
<div id="multi-nav">{menu}</div>
<!-- Mobile Menu -->
<div id="navmobile">
<div class="mb-inner">{menu}</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Custom Header -->
<section id="home" class="home">
<div class="wft-banner-wrap">
{{#header}}
<div class="container">
<div class="wft-banner">{content}</div>
</div>
{{/header}}
</div>
</section>
<!-- Sections -->
<section id="wb_sections">
{{#sections}}
<div class="row">
{content}
</div>
{{/sections}}
</section>
<!-- Portfolio Section 3 -->
<section id="section-three" class="portfolio pad-t100 relative wft-content-wrap" style="background-color: #ffffff;">
<div class="row wft-ph ph-standard-3">
{portfolio:content global="false"}
</div>
<div class="portfolio-img-row row wft-ph ph-standard-3">
<!-- portfolio starts here -->
<!-- Portfolio Filter -->
<!-- to add more title tabs, just add more <li> lines and give it a new class and {porttitle?:text}
<ul class="option-set" data-option-key="filter">
<li><a class="selected" href="#filter" data-option-value="*"><span></span>All</a></li>
<li id="filter1"><a href="#filter"><span></span>{porttitle1:text}</a></li>
<li id="filter2"><a href="#filter"><span></span>{porttitle2:text}</a></li>
<li id="filter3"><a href="#filter"><span></span>{porttitle3:text}</a></li>
<li id="filter4"><a href="#filter"><span></span>{porttitle4:text}</a></li>
<li id="filter5"><a href="#filter"><span></span>{porttitle5:text}</a></li>
</ul> -->
<!-- End Filters -->
<!-- Portfolio Items -->
<div id="posts" class="row isotope ph-portfolio">
<!-- Start Project -->
<div id="folio1" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio1:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio2" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio2:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio3" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio3:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio4" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio4:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio5" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio5:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio6" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio6:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio7" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio7:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio8" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio8:content global="false"}</div>
</div>
<!-- End Project -->
<!-- Start Project -->
<div id="folio9" class="post item spani4 isotope-item">
<div class="profile-photo wft-phi">{folio9:content global="false"}</div>
</div>
<!-- End Project -->
</div>
<!-- portfolio end -->
</div>
</section>
<!-- Contact Footer -->
<footer id="section-five" class="contact relative clearfix">
<div class="row pad-b100 relative wft-ph ph-standard-5">
{contact-one:content}
</div>
<div class="copyright">
<div class="row pad-tb25">
<div class="twelve text-center">
© {copyright:text}
</div>
</div>
</div>
</footer>
<!-- Back to top -->
<div class="back-top-wrap text-center">
<a href="#top" class="scrollto"><i class="back-top relative text-center typcn typcn-arrow-up-outline"></i></a>
</div>
</div>
<!-- End Layout --->
<div style='display:none'>{{footer}}</div>
<!-- Javascript -->
<script>
var para_one = jQuery('#wft-para-img1').find('img').attr('src');
jQuery("#parallax1").css('background-image', 'url("' + para_one + '")');
var para_two = jQuery('#wft-para-img2').find('img').attr('src');
jQuery("#parallax2").css('background-image', 'url("' + para_two + '")');
</script>
<script src="/files/theme/jquery.home-custom.js"></script>
<script src="/files/theme/jquery.owl.js"></script>
<script src="/files/theme/jquery.home-main.js"></script>
答案 0 :(得分:0)
从技术上讲,这是一个重复的问题Answered Here
但是,由于原始文档中没有解释,所以让我指出您遇到的问题。 {content}
只能使用一次。对于其他内容区域,您需要一个自定义标签,例如{content2:content global="false"}
:
注意自定义名称
因此,换句话说,每个自定义内容区域必须有一个自己的自定义名称。然后,global =“ false”表示它将不会在其他页面上重复。参见:Answer Here