使用 umbraco 创建自定义内容部分
我现在正在开发一个 umbraco 网站,要求之一是在后端有一个自定义部分,可用于管理发布较小的微型网站。
我已经能够创建新部分并向其中添加一些节点。我无法开始工作的是发布它们并使它们可以在正确的网址上查看。
举个例子,假设我创建了一个名为 microsite 的新部分,其中有一个名为 myportfolio 的文件夹。这应该路由到类似 www.myumbracosite.com/microsite/myportfolio 的内容。
有谁知道如何让这种事情发挥作用?是否可以从主要内容部分之外的网站发布内容?
任何帮助将不胜感激。
亲切的问候 科林·G
I'm working on an umbraco website just now and one of the requirements is to have a custom section in the back end that can be used to manage publish smaller micro-sites.
I have been able to create the new section and added some nodes to it. What I can't get to work is publishing them and making them viewable at the correct url.
As an example, say i have created a new section called microsite, inside that there is a folder called myportfolio. this should route to something like www.myumbracosite.com/microsite/myportfolio.
Does anyone know how to get this sort of thing working? Is it even possible to publish content from outsite of the main content section?
Any help would be greatly apprechiated.
Kind Regards
Colin G
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
据我了解,自定义部分用于链接到需要接口的自定义数据库或数据。
也就是说,您可以使用 UrlRewriting 和带有宏的现有内容页面来执行类似的操作。
如果您有一个名为 microsite 的页面,那么使用 UrlRewriting 您可以将传递到 microsite.aspx(Umbraco 中的内容页面)的参数设置为“myportfolio”。
通过微型网站模板上的用户控件,它可以显示外部数据库(或自定义部分存储它的任何位置)中的一些内容。
不确定这就是您要寻找的内容...
您为什么要尝试创建一个新部分来获取更多内容?目前的Umbraco内容区对用户和会员都拥有各种权限。微型网站是否都在同一个 Umbraco 安装中?
另一种选择是自定义部分可以简单地用作新站点的设置向导。您可以在正常位置创建新内容和用户,然后只需使用新部分来创建它们。从 C# 创建内容并不太难,因此可能与从用户控件创建内容相同。
您能提供更多信息吗?
From my understanding the custom sections are for linking to custom databases or data somewhere that needs an interface.
That said, you can use UrlRewriting and an existing content page with a macro to do something like that.
If you had a page called microsite, then using UrlRewriting you could make the parameter passed in to microsite.aspx (a content page in Umbraco) be "myportfolio".
With a user control on the microsite template it could display some content from your external database (or wherever your custom section stores it).
Not sure that's what you're looking for...
Why are you trying to create a new section for more content? The current Umbraco content area has all kinds of permissions for both users and members. Are the microsites all in the same install of Umbraco?
Another option is that the custom section could simply be used as a setup wizard for the new sites. You could create new content and users in their normal places and just use the new section to create them. It's not too hard to create content from C#, so it would probably be the same as doing it from a user control.
Could you provide a little more info?