The Layout module creates pages and wraps existing pages in layouts.

Backdrop's primary tool for positioning content is through layouts and blocks. A "layout" is the template that defines regions in which pieces of content may be placed. Each piece of content in this case is called a "block". Blocks may be placed multiple times in a single layout, and each block maintains separate settings. Each layout created saves to a configuration file, including all the settings for the blocks contained within it.

Layout module provides two distinct ways of rendering pages. It is capable of creating a stand-alone page that is created at any custom path specified by the user, and it can also "wrap" the content of any path provided by a module. In the case where a custom path is created, Layout module registers the path in the menu system through hook_menu(). For wrapping module-provided pages, Layout module declares itself as the system-wide "route handler", as checked in menu_execute_active_handler(). Layout module then becomes responsible for calling the module-provided content as a block, and positions other blocks around the existing content.

File

core/modules/layout/layout.module

Functions

Namesort descending Description
layout_autoload_info Implements hook_autoload_info().
layout_block_has_required_contexts Determine if a block has the necessary contexts.
layout_block_info Implements hook_block_info().
layout_clear_layout_tempstore Remove an item from the object cache.
layout_config_info Implements hook_config_info().
layout_contextual_links_view_alter Implements hook_contextual_links_view_alter()
layout_context_required_by_path Given a path with wildcard placeholders (%), determine the required contexts.
layout_create_access Helper function to create a Layout Access.
layout_create_context Helper function to create a Layout Context.
layout_create_handler Helper function to instantiate handlers when loading from config.
layout_create_renderer Helper function to create a Layout Renderer.
layout_flexible_reset_caches Reset all caches provided by Layout module.
layout_flexible_row_styles Provides the default row styles.
layout_flexible_template_load Load an individual flexible template.
layout_flexible_template_load_all Load all flexible templates.
layout_flexible_tempstore_load Get a flexible template currently being edited from the tempstore.
layout_flexible_tempstore_set Store changes to a flexible layout template in the temporary store.
layout_flush_caches Implements hook_flush_caches().
layout_get_access_info Load all layout access information from modules.
layout_get_all_configs Read all configuration files from disk of a particular layout type.
layout_get_block_info Get information about all blocks or just a single one.
layout_get_context_info Load all layout context information from modules.
layout_get_handler_name Helper function to get a handler class name based on the plugin name.
layout_get_layout_by_path Get the layout which is active based on a path or router item.
layout_get_layout_info Deprecated Load the layout template information for a single layout template name.
layout_get_layout_template_info Load the information of either a single layout template or all available layout templates.
layout_get_layout_tempstore Get a layout or menu item currently being edited from the tempstore.
layout_get_path_layout_names Get a list of layouts that share a particular path.
layout_get_renderer_info Load all layout renderer information from modules.
layout_get_style_info Load all layout style information from modules.
layout_get_title_description Gets the title description for the current layout.
layout_layout_api Implements hook_layout_api().
layout_layout_info Implements hook_layout_info().
layout_library_info Implements hook_library_info().
layout_load Load an individual layout.
layout_load_all Return an array of all layouts as fully loaded Layout objects.
layout_load_multiple Load multiple layouts based on a particular criteria.
layout_load_multiple_by_path Load all layouts at a given path.
layout_menu Implements hook_menu().
layout_menu_item_load Load an individual Layout menu item.
layout_menu_item_load_all Return an array of all menu items as fully loaded LayoutMenuItem objects.
layout_menu_item_load_multiple Load menu items by name.
layout_menu_item_load_multiple_by_path Load an individual Layout menu item based on its path.
layout_modules_uninstalled Implements hook_modules_uninstalled()
layout_page_access Menu access callback; Check access for any Layout-provided page.
layout_page_menu_item Create a menu item for Layout-provided pages.
layout_page_title Menu title callback; Return the title for editing a layout.
layout_path_load Menu loader callback; Convert %layout_path placeholders to loaded objects.
layout_permission Implements hook_permission().
layout_provides_path Check if a path is provided by Layout module, as in a custom layout path.
layout_reset_caches Reset all caches provided by Layout module.
layout_route_handler Route handler callback; Execute the current route item or wrap in a layout.
layout_set_handler_contexts Helper function for setting contexts on a layout handler.
layout_set_layout_tempstore Store changes to a layout or menu item in the temporary store.
layout_tempstore_block_load Menu loader to load an individual block from a layout.
layout_tempstore_load Menu loader callback to load a Layout cache object.
layout_tempstore_menu_item_load Menu loader callback to load a Layout cache object.
layout_theme Implements hook_theme()
_layout_get_all_info Load a layout-related information from modules.
_layout_include_files Load all include files for modules that implement hook_layout_api().

Constants

Namesort descending Description
LAYOUT_STORAGE_DEFAULT Layout constant for module-defined layouts.
LAYOUT_STORAGE_NORMAL Layouts constant for user-defined layouts.
LAYOUT_STORAGE_OVERRIDE Layout constant for layouts that override module-defined presets.
LAYOUT_TITLE_BLOCK Layout constant indicating the title of the layout comes from a block.
LAYOUT_TITLE_CUSTOM Layout constant indicating the title of the layout is manually specified.
LAYOUT_TITLE_DEFAULT Layout constant indicating the title of the layout is the default.
LAYOUT_TITLE_NONE Layout constant indicating the title of the layout is not shown.