在 CrafterCMS 中,我正在尝试在当前项目中设置拖放工具。 但是当我在工作室时,我收到以下错误消息:
尽管有错误,我可以通过拖放操作向页面添加新组件,但是当我添加新组件时,所有以前选定的组件都会被新组件替换。
即。如果我有:
通过添加新的“component6”,我得到:
这是页面的模板
<#import "/templates/system/common/cstudio-support.ftl" as studio />
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang=""> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang=""> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9" lang=""> <![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en"> <!--<![endif]-->
<#assign siteTitle = contentModel.title!"" />
<head>
<meta charset="utf-8">
<title>${siteTitle}</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/png" href="/static-assets/images/favicon.ico">
<!--Google Font link-->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,100i,200,200i,300,300i,400,400i,500,500i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Droid+Sans" rel="stylesheet">
<link rel="stylesheet" href="/static-assets/css/animate.css">
<link rel="stylesheet" href="/static-assets/css/iconfont.css">
<link rel="stylesheet" href="/static-assets/css/font-awesome.min.css">
<link rel="stylesheet" href="/static-assets/css/bootstrap.css">
<link rel="stylesheet" href="/static-assets/css/magnific-popup.css">
<link rel="stylesheet" href="/static-assets/css/bootsnav.css">
<!--For Plugins external css-->
<link rel="stylesheet" href="/static-assets/css/plugins.css" />
<!--Theme custom css-->
<link rel="stylesheet" href="/static-assets/css/style.css">
<!--<link rel="stylesheet" href="/static-assets/css/colors/maron.css">-->
<!--Theme Responsive css-->
<link rel="stylesheet" href="/static-assets/css/responsive.css" />
<!-- Scroll Indicator Bullets-->
<link rel="stylesheet" href="static-assets/css/jquery.scrollindicatorbullets.css" />
<script src="/static-assets/js/vendor/modernizr-2.8.3-respond-1.4.2.min.js"></script>
</head>
<body data-spy="scroll" data-target="#navbar-menu" data-offset="110">
<!-- Header -->
<#include "/templates/web/page-home-header.ftl" />
<!-- Sections -->
<div <@studio.iceAttr iceGroup="sections"/> >
<div class="sections" <@studio.componentContainerAttr target="sections" objectId=model.objectId/>>
<#list (contentModel.sections.item)![] as aSection >
<@renderComponent component=aSection />
</#list>
</div>
</div>
<!-- Footer -->
<#include "/templates/web/page-home-footer.ftl" />
<!-- JS includes -->
<script src="/static-assets/js/vendor/jquery-1.11.2.min.js"></script>
<script src="/static-assets/js/vendor/bootstrap.min.js"></script>
<script src="/static-assets/js/jquery.magnific-popup.js"></script>
<script src="/static-assets/js/jquery.easing.1.3.js"></script>
<script src="/static-assets/js/bootsnav.js"></script>
<script src="/static-assets/js/plugins.js"></script>
<script src="/static-assets/js/main.js"></script>
<@studio.toolSupport/>
</body>
</html>
这是我正在使用的组件的模板:
<#import "/templates/system/common/cstudio-support.ftl" as studio/>
<!--Dialogue section-->
<section id="dialogue" class="dialogue bg-white roomy-80" <@studio.componentAttr path=contentModel.storeUrl />>
<#if contentModel.sectionTitle?? ><span class="scrollIndicatorTitle">${contentModel.sectionTitle}</span></#if>
<div class="container">
<div class="row">
<div class="main_dialogue text-center">
<div class="col-md-12">
<h3>${contentModel.text}</h3>
</div>
</div>
</div>
</div>
</section>
当我在日志中添加组件时,我看到:
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Delete for id:"spbb:/site/components/component6.xml" OR parentId:"spbb:/site/components/component6.xml" successful: {responseHeader={status=0,QTime=3}}
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Update for spbb:/site/components/component6.xml successful: {responseHeader={status=0,QTime=3}}
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Commit successful: {responseHeader={status=0,QTime=24}}
[INFO] 2017-05-09 12:25:44,716 [http-nio-8080-exec-9] [spbb] [rest.SiteCacheRestController] | Content cache and Freemarker cache have been cleared for site 'spbb'
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Delete for id:"spbb:/site/website/products/index.xml" OR parentId:"spbb:/site/website/products/index.xml" successful: {responseHeader={status=0,QTime=7}}
WARN : org.craftercms.search.service.impl.RenameFieldsIfMultiValuePostProcessor - Field 'sections.item.component.createdDate_dt' is declared as single value, but multiple values where provided in spbb:/site/website/products/index.xml. Renaming to multi value field 'sections.item.component.createdDate_dts'
WARN : org.craftercms.search.service.impl.RenameFieldsIfMultiValuePostProcessor - Field 'sections.item.component.lastModifiedDate_dt' is declared as single value, but multiple values where provided in spbb:/site/website/products/index.xml. Renaming to multi value field 'sections.item.component.lastModifiedDate_dts'
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Update for spbb:/site/website/products/index.xml successful: {responseHeader={status=0,QTime=7}}
INFO : org.craftercms.search.service.impl.SolrSearchService - [spbb] Commit successful: {responseHeader={status=0,QTime=29}}
[INFO] 2017-05-09 12:25:45,174 [http-nio-8080-exec-10] [spbb] [rest.SiteCacheRestController] | Content cache and Freemarker cache have been cleared for site 'spbb'
我还缺少其他东西吗?