📜  umbraco 8 composer (1)

📅  最后修改于: 2023-12-03 15:35:27.447000             🧑  作者: Mango

Umbraco 8 Composer

Introduction

Umbraco 8 Composer is a package for the Umbraco CMS that allows developers to create and manage reusable content blocks using a drag and drop interface. With Umbraco 8 Composer, you can build rich, complex pages quickly and easily.

Features

Some of the key features of Umbraco 8 Composer include:

  • Drag and drop content block creation
  • Flexible block configurations
  • Reusable content blocks for easier editing and updating of pages
  • Built-in support for Umbraco's grid system
  • Easy integration with Umbraco's media library
  • Fully customizable design and layout options
Dependencies

Umbraco 8 Composer requires Umbraco version 8.0 or higher to be installed.

Installation

To install Umbraco 8 Composer, follow these steps:

  1. In the Umbraco backoffice, go to the "Packages" section.
  2. Click "Install local package" and select the Umbraco 8 Composer package file.
  3. Click "Install package" and Umbraco 8 Composer will be installed.
Usage

Once installed, Umbraco 8 Composer can be accessed through the Umbraco backoffice. To create a reusable content block, follow these steps:

  1. Go to the page you want to add the content block to.
  2. Click on the "Composer Blocks" tab.
  3. Drag and drop the desired block type into the page.
  4. Configure the block as desired using the options provided.
  5. Save the block.

You can now add this block to any other page in your Umbraco website. Changes made to the block will automatically be reflected on all pages that use it.

Code Example

To create a new block type with Umbraco 8 Composer, use the following code:

@inherits Umbraco.Web.Mvc.UmbracoViewPage<ContentModels.MyBlock>

<div>
    <h2>@Model.Title</h2>
    @Html.PropertyFor(m => m.SomeProperty)
</div>

Replace "MyBlock" with the name of the block type you want to create. This code creates a simple block with a title and a single property.

Conclusion

Umbraco 8 Composer is a powerful tool for Umbraco developers looking to create reusable content blocks. With its intuitive UI and powerful features, Umbraco 8 Composer makes building complex, content-rich pages a breeze.