首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >复合c1 cms页面标题不再显示?

复合c1 cms页面标题不再显示?
EN

Stack Overflow用户
提问于 2013-09-10 20:21:09
回答 1查看 167关注 0票数 0

我刚刚开始使用复合c1 cms -我建立了一个基于剃刀/引导示例的站点,它工作得很好,但现在由于某种原因,页面标题无法显示。

相反,生成的标记如下:

代码语言:javascript
复制
<c1marker:marker xmlns:c1marker="http://www.composite.net/ns/asp.net/controls" key="[Composite.Function.Render.Asp.Net.Control.0]">&nbsp;

我从一个名为title of page的布局中调用一个页面模板特性:@PageTemplateFeature("Title of page")

此功能中的代码如下:

代码语言:javascript
复制
<html xmlns:f="http://www.composite.net/ns/function/1.0" xmlns="http://www.w3.org/1999/xhtml">
<head></head>
<body>
    <div class="title">
        <h1>
            <f:function name="Composite.Web.Html.Template.HtmlTitleValue" />&#160;
        </h1>
    </div>
</body>

// -------------------------------------------------------------//

我已经发现了这个问题,以防其他人有这个问题,我使用的是基于HTML boilder plate的模板,HTML标记定义如下:

代码语言:javascript
复制
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

由于某些原因,除非我将xmlns属性添加到html标记中,否则它将无法工作:

代码语言:javascript
复制
<!DOCTYPE html>
<!--[if lt IE 7]>      
<html xmlns="http://www.w3.org/1999/xhtml" class="no-js lt-ie9 lt-ie8 lt-ie7" lang="@Lang"> <![endif]-->
<!--[if IE 7]>         <html xmlns="http://www.w3.org/1999/xhtml" class="no-js lt-ie9 lt-ie8" lang="@Lang"> <![endif]-->
<!--[if IE 8]>         <html xmlns="http://www.w3.org/1999/xhtml" class="no-js lt-ie9" lang="@Lang"> <![endif]-->
<!--[if gt IE 8]><!--> <html xmlns="http://www.w3.org/1999/xhtml" class="no-js" lang="@Lang"> <!--<![endif]-->
<head>
EN

回答 1

Stack Overflow用户

发布于 2017-09-13 00:05:49

根据documentation,您必须插入它,以确保您的模板在使用特定的C1 CMS XML元素进行呈现、函数等时是有效的。

您可能已经注意到,代码是用HTML编写的,而不是。(请在“仔细查看模板标记”一章中阅读有关名称空间和XHTML的更多信息(很抱歉,由于提供链接的堆栈溢出限制,我无法正确附加链接,但这里有空格- "https: //docs.c1.orckestra.com/ Layout/Xml-Templates/A-Closer-Look-at-the-Template-Markup#_A_Closer_Look").)

简而言之,如果你想让CMS正常运行,建议使用它,它不仅仅基于HTML,当然它使用HTML,但它也使用其他语言。页面的大部分是从发出XHTML文档的函数生成的-例如,Razor函数或XSLT函数。Here is Reference,如果你想通过的话。希望我能澄清你的疑问。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18718842

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档