关于果园CMS内映射网络templete详细文档 [英] Detailed documentation about mapping a web templete inside Orchard CMS

查看:152
本文介绍了关于果园CMS内映射网络templete详细文档的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现在网络上链接一个网页模板,我想允许最终用户编辑使用CMS的网站。我发现Orchad CMS,这是基于ASP.Net MVC。但我现在面临的问题是,我没有找到我怎么能映射一个类似于我提​​供了内部管理的一个网页模板完整的文档一个CMS如果园,使最终用户(非技术用户)可以添加新的图像,更改主页的信息,增加新项目等。


解决方案

这基本上可以归结为的写一个新的主题和实现的功能。)

你指的是具体的页面是相当简单的果园它作为一个CMS,拥有丰富内容的定义的并实施的编辑功能的。

然而,你可能想先试试这个:


  1. 忘记了第二个
  2. 模板/主题
  3. 下载并在Visual Studio中运行果园

  4. 尝试使用的默认主题
  5. 来建立你的功能
  6. 配置它,以便其他用户(创建一个测试用户)只要你想(创建新的项目并更改名称/图片)可以使用它。

给你一个良好的开端为#3(没有编码必填项):


  • 您的功能最近的项目
  • 列表
  • 在果园中,最近使用的项目可以实现为的ContentType (其中用户可以创建实例也叫 ContentItem (S))

      

    定义CONTENTTYPES的一种方法是使用落后内容定义管理界面。确保模块内容类型已启用。



  • 您的最近使用的项目的contentType主要有两个属性,即名/标题和形象。这些都可以在几个方面,我不会都提到实施,但最简单的方法是添加字段以将contentType定义(A 文本字段对于名称/标题和的ImageField 的图像)。

      

    提示:您还可以实施的名称/标题中加入 TitlePart 来的RecentProject的contentType而不是使用文本字段。的配件的是这使得乌节一个非常强大的CMS的概念之一,这一个是最容易理解的。其结果是多还是少一样,你会得到一个方法来添加标题到contentitem实例。



到现在为止,你将基本能够创造RecentProjectcontentitems。现在,您将需要创建一种方式来呈现在您的前端contentitems。同样也有这样做的多种方式。我会继续的道路上,你没有创建任何code。


  • 添加 ContainablePart 您RecentProject的contentType。

  • 创建一个名为List'最近的项目'(选择性限制容纳的物品给你containerpart添加到您的contentType后应列在RecentProject

      

    一个列表也有 AutoroutePart 连接这是证明一个前端URL来显示contentitems机制。默认情况下的URL创建基于你的标题,这将导致一个页面 /最近的项目
      确保列表模块启用



  • 请仔细阅读:使用管理(新建> RecentProject)的upperleft的链接不要创建RecentProject contentitems,只好到你刚刚创建的最近的项目列表中。还有就是要创造一种自动的项目挂接到列表中(这是所有做使用 ContainerPart )。
  • 的具体名单新项目的选项

在这一点上,你可以去 /最近的项目,看到显示在你的最近的项目列表详细信息模式。的详细信息显示一个列表基本上呈现其每个包含在在摘要项模式(也是一个可选的寻呼机)。不要介意它看起来现在的方式。如果你把一切都到这里,那么你可以与我提到写一个新的主题的第一个环节开始,但更重要的是,你应该试着去了解的访问和渲染图形和的了解位置信息」这两者都是用来管理那些显示模式,如详细信息和摘要。


  

启用形状跟踪模块来帮助你完成这个。它的


I found a web template on the net link and I want to allow end-users to edit the website using CMS. I found Orchad CMS, which is based on ASP.Net MVC. But the problem I'm facing is that I didn't find the full documentation on how I can map a web template similar to the one I provide to be managed inside a CMS such as Orchard so that end-users (non-technical users) can add new images, change the home page message, add new projects, etc.

解决方案

This basically comes down to "writing a new theme" and implementing the functionality :).

The specific page you are referring to is fairly simple to implement in the Orchard which as a CMS, has extensive content definition and editing possibilities.

However you might want to try this first:

  1. Forget about the template/theme for a second
  2. Download and run Orchard in Visual Studio
  3. Try to build your functionality with the default theme
  4. Configure it so that other users (create a test user) can use it as you want (create new projects and change names/images).

To give you a head start for #3 (NO CODING REQUIRED):

  • Your functionality is a list of 'recent projects'
  • In Orchard, a 'recent project' can be implemented as a ContentType (of which users can 'create instances' also called ContentItem(s))

    One way of defining contenttypes is by using the admin interface behind "Content Definition". Make sure the module "Content Types" is enabled.

  • Your 'recent project' contenttype basically has two properties namely "name/title" and an "image". These can be implemented in several ways which I won't all mention, but the easiest way is by adding Fields to the contenttype definition (A TextField for the name/title and an ImageField for the image).

    tip: You can also implement the name/title by adding the TitlePart to the RecentProject contenttype instead of using a TextField. Parts are one of the concepts which make Orchard a very powerful CMS and this one is the easiest to understand. The result is more or less the same, you will get a way to add a title to the contentitem instances.

Up to this point you will basically be able to create "RecentProject" contentitems. You will now need to create a way to render your contentitems on the frontend. Again there are multiple ways of doing this. I'll continue on the path where you do not have to create any code.

  • Add a ContainablePart to your RecentProject contenttype.
  • Create a List named 'Recent projects' (optionally restrict the containable items to 'RecentProject' which should be listed after you add the containerpart to your contenttype

    A list also has the AutoroutePart attached which is the mechanism for proving a frontend url to display contentitems. By default a url is created based on your title to this would result in a page /recent-projects Make sure the Lists module is enabled

  • Read carefully: Do not create your RecentProject contentitems using the link in the upperleft of the admin ("New > RecentProject"), but go to your 'Recent projects' list which you just created. There is an option to create new items in that specific list which automatically hooks up the items to the list (this is all done using the ContainerPart).

At this point you can go to /recent-projects and see your Recent Projects list being displayed in Detail mode. The Detail display of a List basically renders each of its Contained items in Summary mode (and also a optional pager). Don't mind the way it looks right now. If you got everything up to here then you can start with the first link I mentioned about writing a new theme, but more importantly you should try to understand "Accessing and rendering shapes" and "Understanding placement info" both of which are used to manage those display modes like "Detail" and "Summary".

Enable the Shape Tracing module to help you with this. It is gold!

这篇关于关于果园CMS内映射网络templete详细文档的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆