New answers tagged

0

Visibility Block base on the Role is built-in Drupal 8 feature. go to admin/structure/block and click on your desire block configure button then in Visibility section, there is Role that you can define for which role your module show , or not to show.


0

You can't. This behavior is core functionality from the Block module that's enforcing its data model. Each time you place a block, you're creating a unique Block entity that has a theme property tied to it. Thus, the mainnavigation block entity can't simultaneously be used on the default theme as well as theme3. This is why Drupal defaults to generating $...


1

The documentation is inevitably focused on PHP, since Drupal is written in PHP and server-side renders. And the answer to getting info from PHP/server side to JS/client side is not really Drupal specific. Like any other situation of this ilk in web development, you have two basic choices. Either annotate your HTML with enough elements, IDs and classes ...


0

In Drupal 8, Views pages allow you to render your exposed filters as a separate block. In your view, select your Page display, then, under Advanced, toggle on the option Exposed form in block. You can now separately place the exposed filter like any other block. It doesn't even need to be on the same page as the view results.


0

You could try the FileField Sources module. It provides quite a few additional options to upload files. Re-use files by an auto-complete textfield Attach server-side files uploaded via FTP Transfer files from a remote server (cURL required) Paste a file directly from the clipboard (Drupal 7 only) Select existing files through the IMCE file ...


0

I did it this way to reduce the number of renders. {% set render_sidebar_first = page.sidebar_first|render %} {% if render_sidebar_first and render_sidebar_first|striptags|trim|length > 0 %} {% block sidebar_first %} <aside class="{{ sidebar_class }}" role="complementary"> {{ render_sidebar_first }} </aside> {% endblock %} ...


Top 50 recent answers are included