简体   繁体   English

如何在Umbraco中创建输出xml的页面或文件?

[英]How to create a page or file which outputs xml in Umbraco?

I've done some xslt coding and built a macro, and then I created a new master page template for outputting xml-files, but when I go to the contents section I'm not able to create items from these newly created templates. 我完成了一些xslt编码并构建了一个宏,然后创建了一个用于输出xml文件的新母版页模板,但是当我转到内容部分时,我无法从这些新创建的模板中创建项目。 How should I go about to deliver a xml-source? 我应该如何交付xml源? I am thinking about some sort of webservice but I don't know how much I want to push the CMS. 我正在考虑某种Web服务,但我不知道要推送CMS多少钱。 Maybe it get's some consequences. 也许会带来一些后果。

Templates, by themselves, cannot be added to the content section. 模板本身不能添加到内容部分。 You must create a Document Type and associate your Template to that Document Type. 您必须创建一个文档类型并将您的模板关联到该文档类型。 Only then will you be able to create an instance of that Document Type (along with it's template) inside the Content section. 只有这样,您才能在“内容”部分中创建该文档类型的实例(及其模板)。

Also, confirm that your newly created node in the Content section has the correct template by checking on the node's Properties tab. 另外,通过检查节点的“属性”选项卡,确认“内容”部分中新创建的节点具有正确的模板。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM