建立一个网站与果园CMS [英] Building a site with Orchard CMS

查看:249
本文介绍了建立一个网站与果园CMS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在努力学习果园的早期阶段,而且我似乎仍然对如何建立包含各种内容众多,可以由非技术用户轻松管理页面的基础知识挣扎

I'm in the early stages of trying to learn Orchard, and I'm still seem to be struggling with the basics on how to build a page containing a multitude of various content that can be easily managed by non-technical users.

在理想情况下,我想要做的是下面,我只是无法弄清楚如何使用内容类型,部位,字段,窗口小部件,区域等。另外,以适应它进入果园的架构,因为我还在原地学习,我也想避免任何自定义模块,或硬编码的内容到网站(尽管我接受这个想法,如果是把它做的最好办法!)。

Ideally, what I'm trying to do is the following, I just can't figure out how to fit it into the Orchard architecture using Content Types, Parts, Fields, Widgets, Zones, etc. Also, since I'm still learning, I'm also trying to avoid any custom modules, or hard-coding content into the site (though I'm open to the idea, if that's the best way to get it done!).

目标:创建一个包含菜单中的主页的布局,图像幻灯片,以及多个功能描述。在幻灯片放映的每个图像,我需要一个标题,副标题,描述,和一个图像。为了使这个容易让非技术用户管理,我想定义HTML模板(自定义内容类型,部件或其他),并允许作者指定只是那些定义良好的性能。我试着用内容零件这一点,但不幸的是,我只能有一块内容的特定类型的一个内容部分。我也看到了建议,以具有相同的属性集创建多个内容部分,但我不知道有多少图像将显示出来(我不希望分配任意数)。

Goal: Create a "home page" layout containing a Menu, Image slideshow, and several feature descriptions. For each image in the slideshow, I need a title, sub-title, description, and an image. To make this easy for non-technical users to manage, I would like to define the HTML template (custom Content Type, Part, or whatever), and allow authors to specify just those well-defined properties. I tried using Content Parts for this, but unfortunately, I can only have one Content Part of a particular type on a piece of Content. I also saw recommendations to create multiple Content Parts with the same set of properties, but I don't know how many images will be displayed (and I don't want to assign an arbitrary number).

我需要做的特征描述类似的东西,允许作者指定图像,标题,描述和网页链接到。我遇到了同样的问题上面一样,我不知道如何让作者指定的内容有限列表,但每个内容项得到很好的界定。

I need to do something similar for feature descriptions, allowing authors to specify an image, title, description, and a page to link to. I'm running into the same problem as above, I'm not sure how to allow authors to specify a finite list of content, but have each content item be well-defined.

到目前为止,最好的选择似乎已创造了某种自定义的widget,以主人的内容,但由于某些原因,我的直觉告诉我,创造一个单一的页面定制层只是指定要显示的内容滥用层的目的,就是开始能够定制基于某些条件的特定布局(用户是否被验证,例如)。

So far, the best option appears to be creating some sort of custom widget to "host" the content, but for some reason, my gut tells me that creating a custom layer for a single page just to specify which content to display is abusing the purpose of layers, which is begin able to customize a particular layout based on some criteria (whether or not the user is authenticated, for example).

我希望是有道理的,和我道歉,这花了这么多的话来解释我的问题,我只是真正达到我的无奈的高峰,虽然我认为果园家伙肯定有它而言想通了建筑,我只是不能让过去这些看似简单的问题,建立一个简单的网站。

I hope that made sense, and I apologize that it took so many words to explain my issue, I've just really reached my peak of frustration, and although I think that the Orchard guys definitely have it figured out in terms of architecture, I just can't get past these seemingly simple problems to build a simple website.

我极大的AP preciate任何提示,建议,意见这个社会所提供的!

I greatly appreciate any tips, suggestions, advice this community has to offer!

TIA,-Jeremy

TIA, -Jeremy

推荐答案

在乌节来定义什么是指定功能内容类型。

What you defined in Orchard terms is a Content Type named Feature.


  • 转至目录 - >内容类型,然后单击创建

  • 选择默认的部分:

    • 标题,因为你希望你的作者为功能提供了一个很好的标题/名称

    • 自动敷设,这将创建一个基于标题一个SEO友好的URL(可定制)

    • 单击保存


    • 字幕,TextField类型。其配置为默认值,必需。

    • 描述,TextField类型。其配置为文本区域,必需。

    • 图像,类型媒体选择。其配置为必选。

    现在您可以通过点击在仪表板的顶部左侧部分的链接上创建功能。
    下一步是把这些功能在主页上。我的建议是创建将被设置为主页的预测。投影是只是一个URL时,将显示查询作为其内容的结果页面。在你的情况下,查询将是给我按创建日期排序的所有功能。

    Now you can create Features by clicking on the link in the top left part of the Dashboard. Next step is to put those features on the homepage. What I suggest is to create a Projection which will be set as the homepage. A Projection is just a Page with an Url, which will display the result of a query as its content. The Query in your case will be "Give me all Features ordered by Creation Date".


    • 在仪表板上,点击查询

    • 单击创建一个新的查询

    • 输入所有功能

    • 单击添加一个新的过滤器

    • 选择内容类型,然后选择功能,保存

    • 单击添加一种绕圈

    • 选择创建日期,遂降,保存

    在这一点上,你已经可以通过点击preVIEW preVIEW查询的结果。但是,我们要的是前端的页面。

    At this point, you can already preview the result of the query by clicking on Preview. But what we want is a front-end page.

    点击投影仪表板的新一节中创建一个新的投影(顶部再次离开)
    - 给它一个标题,不要忘记检查设置为主页,使其主页
    - 选择唯一可用的查询,名为所有Featrues
    - 保存

    Create a new Projection by clicking on Projection in the "New" section of the dashboard (top left again) - Give it a title, and don't forget to check "Set as Home page" to make it the home page - Select the only available query, named "All Featrues" - Save

    在主页上,你应该看到的所有功能,按日期排序。但你想要的是一个滑块。在这一点上,你需要两个步骤:
    - 集成滑块jQuery插件
    - 渲染兼容HTML与jQuery插件

    On the home page you should see all the features, ordered by date. But what you want is a slider. At that point you need two more steps: - Integrate a slider jQuery plugin - Render the HTML compatible with your jQuery plugin

    在默认情况下,当你渲染投影它将使用标准的摘要布局。但是,使用投影你可以决定到底是什么布局要应用,并且正是HTML标签和类。

    By default, when you render a Projection it will use the standard "Summary" layout. But using projections you can decide exactly what layout you want to apply, and exactly what html tags and classes.


    • 编辑命名查询所有功能

    • 添加新布局

    • 选择HTML列表

    • 选择属性,保存

    • 单击添加属性

    • 选择显示文本,保存

    • 执行相同的

      • 特点:字幕

      • 特点:说明

      • 功能:图像

      您将看到每个属性在HTML容器呈现。

      You will see that each property is rendered in an html container.

      通过编辑每个属性,你可以决定要应用的类,并且要使用的HTML标记。通过改变他们,你可以使你想要什么,并自定义你的CSS / HTML很好地渲染滑块。这纯粹是你的HTML知道要在这里申请,或者找一些文章有关。

      By editing each property you can decide which class to apply, and which html tag to use. By changing them you can render exactly what you want, and customize your CSS/HTML to render the slider nicely. This is purely your HTML know have to apply here, or find some articles about that.

      有关您的编辑,他们只是要到仪表板,并添加/更新某些功能的内容项目,将在网站上反映出来。

      For your editors, they just have to go to the dashboard and add/update some feature content items, it will be reflected on the website.

      可选上有果园画廊滑块模块。你可以试试这一个了。但是,如果你要处理什么发生了,我描述的技术更好。

      Optionally there is a Slider module on the Orchard Gallery. You can try this one too. But if you want to handle exactly what happens the technique I described is better.

      这篇关于建立一个网站与果园CMS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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