Skip to content

Orchard provides a powerful but simple theming system for customizing the look and feel of your site. Orchard includes one theme in the default installation to help you get started.

Orchard提供了一个功能强大但简单的主题系统,用于自定义站点的外观。 Orchard在默认安装中包含一个主题,以帮助您入门。

Managing Themes

管理主题

To manage themes, click Themes in the dashboard.

要管理主题,请单击仪表板中的主题

The main Themes screen defaults to the Installed tab, which displays the current theme, shows any other available themes, and lets you upload a new theme. There are also tabs for the Gallery (which shows additional online themes you can install), Updates (which shows available updates for installed themes), and a link to Install a theme from your computer (use this to install a theme package from your local computer to your site). For more information on options for adding new themes, see Installing Themes.

主题屏幕默认为已安装标签,显示当前主题,显示任何其他可用主题,并允许您上传新主题。还有 Gallery 的选项卡(显示可以安装的其他在线主题),更新(显示已安装主题的可用更新),以及指向从计算机安装主题的链接 (使用此方法将主题包从本地计算机安装到您的站点)。有关添加新主题的选项的更多信息,请参阅[安装主题](安装主题)。

To download and install additional themes, click the Gallery tab. Click Install on a theme to install it in your site. To see how themes work, install the Contoso and the Classic themes.

要下载并安装其他主题,请单击 Gallery 选项卡。单击主题上的安装以将其安装在您的站点中。要查看主题如何工作,请安装 Contoso Classic 主题。

After you have installed a theme, click the Installed tab on the Themes screen. Any newly installed themes appear in the Available section.

安装主题后,单击主题屏幕上的已安装选项卡。任何新安装的主题都会显示在 Available 部分中。

As you can see from the links and buttons on the available themes, you have the following options for each theme:

从可用主题的链接和按钮可以看出,每个主题都有以下选项:

  • Preview. Lets you preview a theme before you apply it. This lets you see how a theme will look on your site, but site visitors do not see the new theme until you apply it.

  • 预习。允许您在应用主题之前预览主题。这可以让您了解主题在您网站上的外观,但网站访问者在您应用主题之前不会看到新主题。

  • Set Current. Changes the current theme of the site to the selected theme.

  • 设定电流。将网站的当前主题更改为所选主题。

  • Uninstall. Removes a theme from the Available themes section.

  • 卸载。从 Available themes部分删除主题。

  • Enable. Used for two cases: dependent themes and multiple themes. For dependent themes, you can create a set of themes that depend on each other (by specifying a BaseTheme value in the Theme.txt file), so that activating that theme automatically enables the others. For multiple themes, you can enable several themes at once (even though only one theme is set as the current theme), which lets you dynamically change the current theme based on an incoming request. These are advanced topics that aren't covered here.

  • [启用]。用于两种情况:依赖主题和多个主题。对于依赖主题,您可以创建一组彼此依赖的主题(通过在_Theme.txt_文件中指定 BaseTheme 值),以便激活该主题自动启用其他主题。对于多个主题,您可以一次启用多个主题(即使只有一个主题设置为当前主题),这样您就可以根据传入的请求动态更改当前主题。这些是此处未涉及的高级主题。

Note You do not have to click the Enable link to carry out the other operations on themes, such as previewing a theme or setting the current theme.

注意您无需单击启用链接即可对主题执行其他操作,例如预览主题或设置当前主题。

Previewing and Applying Themes

预览和应用主题

To experiment with the theme features, click Preview on an available theme. The following illustration shows a site in preview mode for the Contoso theme. The drop-down list lets you preview other themes.

要试用主题功能,请在可用主题上单击预览。下图显示了 Contoso 主题的预览模式中的网站。下拉列表允许您预览其他主题。

Click Cancel to exit preview mode and return to the Themes screen.

单击取消退出预览模式并返回主题屏幕。

Note: By default, a newly installed theme is not enabled. When you preview a theme it is automatically enabled. Only enabled themes are shown in the drop-down list of themes available for preview.

注意:默认情况下,未启用新安装的主题。预览主题时,它会自动启用。只有已启用的主题会显示在可供预览的主题下拉列表中。

Click Set Current on an available theme. The following illustration shows the Themes screen after you click Set Current on the Contoso theme.

单击可用主题上的设置当前。下图显示了 Contoso 主题上的 Set Current 后的主题屏幕。

When return to the home page for your site, the new theme is applied to your pages.

返回到您网站的主页时,新主题将应用于您的网页。

Change History

改变历史

  • Updates for Orchard 1.1

  • Orchard 1.1的更新 *

    • 3-21-11: Updated screen shots and reworked text for installing, applying, and previewing themes.