Add content ( elements, templates, and blocks ) The navigation bar has the following options. With the navigation bar, you can access all the options available to Visual Composer Website Builder. The navigation bar is located on the left side of the screen. The main control of Visual Composer Website Builder is the navigation bar. Once a new page is created or an existing page edited using Visual Composer you will see the Visual Composer Editor Interface load up. With Visual Composer, you instantly see any results you make and ensure that your site is ready for publishing without exiting the editor. That's it! With this simple template we've added composer functionality to our block.Visual Composer Website Builder has a what-you-see-is-what-you-get interface for creating and editing page designs. Note: $view->field() works in regular block edit and add templates as well, so it's a good idea to use it, rather than just hard-coding "content". Instead, we use $view->field('content') which takes care of ensuring our "content" parameter will be unique to this composer control instance, and automatically translates it back to "content" when saving the form. We do this because multiple blocks with the same parameters can exist in one composer form, so we can't just name our composer elements indiscriminately. This transforms "content" into something like that looks like this ptComposer. Instead of using "content" as the name of the text area input element, we make the name of the text area input element $view->field('content'). This is very similar to the edit interface for the HTML block, with one very important difference. Next, we see the only form element that the HTML block uses, the text area. The composer template itself is responsible for rendering labels and help text, because we wanted to give developers maximum flexibility for how they displayed that information (or chose not to.) Additionally, we use the Bootstrap tooltip library to provide access to the help text, if a user provided it through the interface. The $label parameter is either going to be "HTML" or the custom label set through Composer. Textarea($view->field('content'), $content, array( Here is the HTML block composer template: The field() method on this class is how the composer templates output their form names. This is an instance of the Concrete\Core\Block\View\BlockView class. This description can be specified through the page type edit interface. This is the help description specified for this particular composer control. This label can be customized through the page type interface. This is a text representation of the composer control label. These are variables found in the composer.php template automatically that will be useful. touch application/blocks/your_block/composer.php In order for your block type to be listed in the Block "Add Control" interface on the Page Type edit screen, a file named "composer.php" must be present in the block's directory. Since composer view for a page is the same for adding a page and editing a page, there aren't separate add and edit templates. Block Appearing in the Page Type Edit Interface Any block type can be included in Concrete CMS's Page Type composer interface.
0 Comments
Leave a Reply. |