Commit 43934a32 authored by alexpott's avatar alexpott

Issue #1898424 by joelpittet, duellj, Cottser, mr.baileys: layout.module -...

Issue #1898424 by joelpittet, duellj, Cottser, mr.baileys: layout.module - Convert PHPTemplate templates to Twig.
parent 4cc09aaf
{#
/**
* @file
* Template for a 1 column layout.
*
* This template provides a simple one column display layout.
*
* Avaiable variables:
* - attributes: Attributes to be placed on the wrapping element.
* - content: All content items, each content item is keyed to one region of the
* layout. 'content' contains the following section:
* - content: Content in the content column.
*
* @ingroup themeable
*/
#}
<div class="layout-display layout-one-col {{ attributes.class }}"{{ attributes }}>
<div class="layout-region">
{{ content.content }}
</div>
</div>
<?php
/**
* @file
* Template for a 1 column layout.
*
* This template provides a simple one column display layout.
*
* Variables:
* - $content: An array of content, each item in the array is keyed to one
* region of the layout. This layout supports only one section:
* - $content['content']: Content in the content column.
*/
?>
<div class="layout-display layout-one-col <?php print $attributes['class']; ?>"<?php print $attributes; ?>>
<div class="layout-region">
<?php print $content['content']; ?>
</div>
</div>
<?php {#
/** /**
* @file * @file
* Template for a 2 column layout. * Template for a 2 column layout.
...@@ -6,19 +6,22 @@ ...@@ -6,19 +6,22 @@
* This template provides a two column display layout, with each column equal in * This template provides a two column display layout, with each column equal in
* width. * width.
* *
* Variables: * Available variables:
* - $content: An array of content, each item in the array is keyed to one * - attributes: Attributes to be placed on the wrapping element.
* region of the layout. This layout supports the following sections: * - content: All content items, each content item is keyed to one region of the
* - $content['first']: Content in the first column. * layout. 'content' contains the following sections:
* - $content['second']: Content in the second column. * - first: Content in the first column.
* - second: Content in the second column.
*
* @ingroup themeable
*/ */
?> #}
<div class="layout-display layout-two-col clearfix <?php print $attributes['class']; ?>"<?php print $attributes; ?>> <div class="layout-display layout-two-col clearfix {{ attributes.class }}"{{ attributes }}>
<div class="layout-region layout-col-first"> <div class="layout-region layout-col-first">
<?php print $content['first']; ?> {{ content.first }}
</div> </div>
<div class="layout-region layout-col-second"> <div class="layout-region layout-col-second">
<?php print $content['second']; ?> {{ content.second }}
</div> </div>
</div> </div>
<?php {#
/** /**
* @file * @file
* Template for a one column layout. * Template for a one column layout.
* *
* This template provides a very simple "one column" display layout. * This template provides a very simple "one column" display layout.
* *
* Variables: * Avaiable variables:
* - $content: An array of content, each item in the array is keyed to one * - content: All content items, each content item is keyed to one region of the
* region of the layout. This layout supports the following sections: * layout. 'content' contains the following section:
* $content['middle']: The only region in the layout. * - middle: The only region in the layout.
*
* @ingroup themeable
*/ */
?> #}
<div class="layout-display layout-one-col clearfix"> <div class="layout-display layout-one-col clearfix">
<div class="layout-region layout-col"> <div class="layout-region layout-col">
<div class="inside"><?php print $content['middle']; ?></div> <div class="inside">{{ content.middle }}</div>
</div> </div>
</div> </div>
<?php {#
/** /**
* @file * @file
* Template for a 2 column layout. * Template for a 2 column layout.
...@@ -6,19 +6,21 @@ ...@@ -6,19 +6,21 @@
* This template provides a two column display layout, with each column equal in * This template provides a two column display layout, with each column equal in
* width. * width.
* *
* Variables: * Available variables:
* - $content: An array of content, each item in the array is keyed to one * - content: All content items, each content item is keyed to one region of the
* region of the layout. This layout supports the following sections: * layout. 'content' contains the following sections:
* - $content['left']: Content in the left column. * - left: Content in the left column.
* - $content['right']: Content in the right column. * - right: Content in the right column.
*
* @ingroup themeable
*/ */
?> #}
<div class="layout-display layout-two-col clearfix"> <div class="layout-display layout-two-col clearfix">
<div class="layout-region layout-col-left"> <div class="layout-region layout-col-left">
<div class="inside"><?php print $content['left']; ?></div> <div class="inside">{{ content.left }}</div>
</div> </div>
<div class="layout-region layout-col-right"> <div class="layout-region layout-col-right">
<div class="inside"><?php print $content['right']; ?></div> <div class="inside">{{ content.right }}</div>
</div> </div>
</div> </div>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment