小编P.M*_*hna的帖子

如何实现Data Extender以在组件创建页面中填充List?

我是Tridion中Data Extenders概念的新手.我开始知道它需要来自SDL Tridion 2011 SP1在线文档的配置文件和cs文件.是否需要使用核心服务?请解释一下我的步骤.提前致谢.早期的反应表示赞赏.

c# tridion

3
推荐指数
1
解决办法
157
查看次数

如何在SDL Tridion中向自然文本字段添加自定义标记?

在SDL Tridion 2011 SP1中,我想在富文本字段(RTF)中允许自定义XML标记(节点),例如

<dynamicVariable name='ABC'></dynamicVariable>
Run Code Online (Sandbox Code Playgroud)

这会触发错误

字段'text'包含无效标记

我如何允许这样的自定义标签?

xml tridion

0
推荐指数
1
解决办法
1487
查看次数

如何防止在C#TBB中的xml文档中编码字符<>?

我正在编写C#TBB,它从组件源获取输入,XmlElement然后将其转换XPathDocument为易于遍历.然后使用将读取的内容写入内存流XmlWriter.最后我将它推向输出XmlDocument.在输出xml文档中,像<>这样的字符在编码格式中是可见的&lt; &gt;.如何防止对这些字符进行编码?

<%@Import NameSpace="System.IO"%>
<%@Import Namespace="System.Xml.XPath"%>
<%@Import nameSpace="Tridion.ContentManager.CommunicationManagement"%>
using (MemoryStream ms = new MemoryStream())

        {             

            TemplatingLogger log = TemplatingLogger.GetLogger(typeof(test)); 
            XmlTextWriter securboxXmlWriter = new XmlTextWriter(ms, new System.Text.UTF8Encoding(true));
            securboxXmlWriter.Indentation = 4;
            securboxXmlWriter.Formatting = Formatting.Indented;
            securboxXmlWriter.WriteStartDocument();
            securboxXmlWriter.WriteStartElement("comp");                
            securboxXmlWriter.WriteAttributeString("xmlns", "http://www.w3.org/1999/xhtml");
            securboxXmlWriter.WriteStartElement("con");
            securboxXmlWriter.WriteStartElement("wf:wf");
            securboxXmlWriter.WriteStartElement("wf:sI");                

            Component component=null;
            string componentId = string.Empty;
            try
            {
                component = engine.GetObject(package.GetByName(Package.ComponentName)) as Component;
                log.Debug("componentId:"+component.Id);
            }
            catch (Exception e)
            {
                throw new InvalidOperationException("Component not found:" + e);
            }
        XmlElement componentxml = component.Content; …
Run Code Online (Sandbox Code Playgroud)

xml xml-parsing tridion

0
推荐指数
1
解决办法
2689
查看次数

如何删除"预期"之类的错误 在Tridion弹出页面?

我正在自定义功能区工具栏并为其添加一个按钮.每当我点击该按钮时,它将打开一个aspx页面,允许作者选择一些数据,这些数据会附加到现有的RTF字段内容中.

但是当弹出窗口打开时,它在浏览器(Internet Explorer)中出现以下错误.

我在代码隐藏文件中继承了Tridion页面.当我尝试使用Response.Write()函数时,它会给出类似"Expected;"的错误.请告诉我它之所以给出错误的原因是什么?早期的回应表示赞赏.提前致谢.

PFB相关代码:文件内容后面的Aspx页面代码:

namespace ButtonReference.Popups
{     
    [ControlResourcesDependency(new Type[] { typeof(Popup), typeof(Tridion.Web.UI.Controls.Button), typeof(Stack), typeof(Dropdown), typeof(List) })]
    [ControlResources("RTFExtensions.ButtonReferenece")]
    public partial class PopupReference : TridionPage
    {
        protected override void OnInit(EventArgs e)
        {
            base.OnInit(e);

            TridionManager tm = new TridionManager();

            tm.Editor = "PowerTools";
            System.Web.UI.HtmlControls.HtmlGenericControl dep = new System.Web.UI.HtmlControls.HtmlGenericControl("dependency");
            dep.InnerText = "Tridion.Web.UI.Editors.CME";
            tm.dependencies.Add(dep);

            System.Web.UI.HtmlControls.HtmlGenericControl dep2 = new System.Web.UI.HtmlControls.HtmlGenericControl("dependency");
            dep2.InnerText = "Tridion.Web.UI.Editors.CME.commands";
            tm.dependencies.Add(dep2);

            //Add them to the Head section 
            this.Header.Controls.Add(tm); //At(0, tm); 
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            mySession = new Tridion.ContentManager.Session(@"");
            if …
Run Code Online (Sandbox Code Playgroud)

c# asp.net tridion

-2
推荐指数
1
解决办法
174
查看次数

标签 统计

tridion ×4

c# ×2

xml ×2

asp.net ×1

xml-parsing ×1