added ids to block on pages manager layout
This commit is contained in:
@@ -35,11 +35,14 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
|
||||
|
||||
}
|
||||
|
||||
/*$rows = $variables['rows'];
|
||||
/*
|
||||
$rows = $variables['rows'];
|
||||
$style = $view->style_plugin;
|
||||
$options = $style->options;
|
||||
$variables['default_row_class'] = !empty($options['default_row_class']);*/
|
||||
/* foreach ($rows as $id => $row) {
|
||||
$variables['default_row_class'] = !empty($options['default_row_class']);
|
||||
*/
|
||||
/*
|
||||
foreach ($rows as $id => $row) {
|
||||
$variables['rows'][$id] = array();
|
||||
$variables['rows'][$id]['content'] = $row;
|
||||
$variables['rows'][$id]['attributes'] = new Attribute();
|
||||
@@ -48,5 +51,14 @@ function popsu_preprocess_views_view_unformatted(&$variables) {
|
||||
$variables['rows'][$id]['attributes']
|
||||
->addClass($row_class);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
*/
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Implements hook_preprocess_block().
|
||||
*/
|
||||
// function popsu_preprocess_block(&$variables) {
|
||||
// $t="t";
|
||||
// }
|
39
web/themes/custom/popsu/templates/layout/block.html.twig
Normal file
39
web/themes/custom/popsu/templates/layout/block.html.twig
Normal file
@@ -0,0 +1,39 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a block.
|
||||
*
|
||||
* Available variables:
|
||||
* - plugin_id: The ID of the block implementation.
|
||||
* - label: The configured label of the block if visible.
|
||||
* - configuration: A list of the block's configuration values.
|
||||
* - label: The configured label for the block.
|
||||
* - label_display: The display settings for the label.
|
||||
* - provider: The module or other provider that provided this block plugin.
|
||||
* - Block plugin specific settings will also be stored here.
|
||||
* - content: The content of this block.
|
||||
* - attributes: array of HTML attributes populated by modules, intended to
|
||||
* be added to the main container tag of this template.
|
||||
* - id: A valid HTML ID and guaranteed unique.
|
||||
* - title_attributes: Same as attributes, except applied to the main title
|
||||
* tag that appears in the template.
|
||||
* - title_prefix: Additional output populated by modules, intended to be
|
||||
* displayed in front of the main title tag that appears in the template.
|
||||
* - title_suffix: Additional output populated by modules, intended to be
|
||||
* displayed after the main title tag that appears in the template.
|
||||
*
|
||||
* @see template_preprocess_block()
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
<div id="{{ derivative_plugin_id }}" {{ attributes }}>
|
||||
{{ title_prefix }}
|
||||
{% if label %}
|
||||
<h2{{ title_attributes }}>{{ label }}</h2>
|
||||
{% endif %}
|
||||
{{ title_suffix }}
|
||||
{% block content %}
|
||||
{{ content }}
|
||||
{% endblock %}
|
||||
</div>
|
@@ -0,0 +1,25 @@
|
||||
{#
|
||||
/**
|
||||
* @file
|
||||
* Default theme implementation to display a one-column layout.
|
||||
*
|
||||
* Available variables:
|
||||
* - content: The content for this layout.
|
||||
* - attributes: HTML attributes for the layout <div>.
|
||||
*
|
||||
* @ingroup themeable
|
||||
*/
|
||||
#}
|
||||
{%
|
||||
set classes = [
|
||||
'layout',
|
||||
'layout--onecol',
|
||||
]
|
||||
%}
|
||||
{% if content %}
|
||||
<div{{ attributes.addClass(classes) }}>
|
||||
<div {{ region_attributes.content.addClass('layout__region', 'layout__region--content') }}>
|
||||
{{ content.content }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
Reference in New Issue
Block a user