Theming is about the development, adaption and configuration of "themes". A "theme" in Drupal is a set of files containing PHP, templates, Javascript and CSS that in concert provides a certain appearance of a site, and that clearly separates layout and styling of a Drupal site from content and ...

learn more… | top users | synonyms (8)

0
votes
0answers
4 views

How to use min-width or max-height for panel elements in a theme? [on hold]

How to use min-width or max-height for panel elements in a responsive theme (in my case Zircon is used)? When min-width is used, elements overlap when resized for mobile phones. max-height tends not ...
0
votes
0answers
7 views

Make menu link expand instead of redirect

Let's say that I have a following menu: A A1 A2 B Which looks like this: When somebody clicks on the arrow on the right of A (or in the empty space on the left of the arrow) the submenu ...
1
vote
1answer
16 views

Render block programmatically in Drupal 8 returns 0

I create a block at /admin/structure/block/block-content and I want programmatically render it in our custom template files. What I did is function hook_preprocess_page(&$vars) { $block = \...
0
votes
0answers
8 views

Targeting values within an stdClass variable

I'm trying to target a value in an object in my form, but Drupal throws an error when I try. The object I'm trying to target is the 'amount'. However, when I try to dpm the variable in question, '...
1
vote
0answers
14 views

Get Multiple Field Values Out Separately In Twig

I have a content type called 'locations' with a bunch of plain text fields. Each field allows for multiple values. For example, one of the fields is named 'support' and allows for an unlimited amount ...
-1
votes
0answers
10 views

query in drupal 7 [on hold]

SELECT TYPE , COUNT( * ) AS Total FROM table WHERE DATE_FORMAT( FROM_UNIXTIME( created ) , '%Y-%m-%d' ) BETWEEN '2014-02-01' AND '2014-12-01' AND TYPE IN ( 'freenews', 'news' ) GROUP BY TYPE LIMIT 0 , ...
0
votes
2answers
20 views

How can I theme the Bootstrap base theme search block?

I've created a sub-theme of the Drupal 8 Bootstrap base theme. My problem is that I'm using a customized version of the Bootstrap CSS Framework that does not include Glyphicons. Instead of Glyphicons, ...
1
vote
1answer
24 views

How Can Create Node Info Bar (or Node Info Block)?

I want to create a teaser with belove sections: 1- Title Section. 2- Information Section (Info Bar): When this Node Writed? (Date & Time). Whom is writed this Node: (Author of Node). What ...
0
votes
1answer
17 views

How to map views url to blog url

In my site I am using blogs module. When I used sitename/blog default blog page will display. But my requirement is, I have created a view to display the blogs, this is on the path of sitename/blog-...
0
votes
0answers
16 views

Zurb Foundation 6 Drop dowm menu problem

I am creating a theme with Drupal 8, and I am having a problem with the Foundation drop down menu. I included Zurb foundation with Gulp and NPM. I think the problem is with the Foundation JavaScript ...
0
votes
1answer
13 views

How do i get views field labels in the template file

I am creating a view, and displaying view by using custom template files. As per theme suggestions I named the template file for fields as views-view-fields--blog-display--page.tpl. In this file I ...
3
votes
2answers
63 views

How to template a view and be able to manipulate the content with it?

I'm wondering if there's a way to template a View, and actually be able to manipulate the content within it. I know I can theme the 'wrapper' around the View, but I'd like to be able to override what'...
0
votes
1answer
23 views

How to create custom form and theme? [on hold]

I am new to drupal and this community. I want to create a form like below. I write my custom form but my question is how can I show my form table format like columns and rows headers? There can be ...
1
vote
1answer
27 views

how theme/template connected/related to each other

for example, I have: module id: module_id (file: module_id.info.yml) FieldType ID: FieldTypeID (file: /src/plugin/Field/FieldType/FieldType.php) FieldWidget: FieldDefaultWidget (file: /src/plugin/...
3
votes
2answers
58 views

base_path Drupal 8

I want to use base path in drupal 8 in twig file, I try followings but no one return anything {{ app.request.baseUrl }} {{base_path}} what I need is absolute path to node {{ app.request.baseUrl ...
3
votes
1answer
43 views

Render node author profile image in node template

I am working on customization Node template file in Drupal 8, I added another field to user in admin/config/people/accounts/fields ( my field is field_bio). Now I want to render author image( with ...
1
vote
0answers
6 views

override simplenewsletter form template

I want to customise simple newsletter subscription form. I enabled debug twig, but I don't see any suggestion for override form template. how can I override newsletter subscription form in template?
0
votes
1answer
10 views

View that display single node which has id the same as last part of url (from last / to the end)

I have an urls: website.com/portfolio-entries/23 website.com/portfolio-entries/25 I would like to make an view for them to display node which has id the same as last part of url (from last / to ...
0
votes
2answers
12 views

How to print entity referenced fields (node) title in node.tpl.php?

I want to print an entity referenced fields (node) title in node--customtype.tpl.php. <?php print render($content['field_my_entity_reference']); ?> prints the field with some CSS class as below:...
0
votes
1answer
36 views

How to add a class to the site logo of the system branding block

I'd like to add a class of 'svg' to my site_logo img itself using template preprocess. Here's what I have written: function mythemename_preprocess_block__system_branding_block(&$variables) { ...
0
votes
0answers
19 views

Twig paragraphs

I have a node "release" that has a paragraph "field_tracks" which has fields such as "field_track_number", "field_recording_time", and "field_track_title". I'm new to twig and I cannot wrap my head ...
-1
votes
0answers
17 views

How to fix my Drupal 8.1.3 error after disable cache? [on hold]

I try to use Drupal 8.1.3 and I'm a beginner. Each time I try to disable cache on my localhost sites there is an error message and i don't know how to fix it i have the full privile on settings.php i ...
0
votes
1answer
21 views

Use content field as data attribute in Views html

I have a piece of content with an 'Asset Type' field value of Vidyard. I am using the Views module to render this content on another page. I have added those fields to the View, but is it possible ...
2
votes
1answer
33 views

How do I remove <div class=“views-element-container form-group”> from output?

I'm trying to theme the output of a Drupal 8 view to use via a token for email recipients of a YAML form. I'm on the latest Drupal 8 core release and using a Bootstrap subtheme. I have successfully ...
0
votes
0answers
32 views

Get node visits number in node template [duplicate]

I enabled statistics module and then now I want to get the node view number in node template file.how can I get the number of node visited in node template? I overrode node template files:node--blog....
0
votes
0answers
7 views

Inconsistent font in Profile2

I am using a Profile2 module to create user profiles. I added several fields in for the profile and amongst them a field (called 'Type') of TERM REFERENCE type to get values from my custom Taxonomy. ...
2
votes
1answer
41 views

Get select list Value in node template

I have a integer selection list field in my content types with some key|Value options. 0|CEO 1|CTO 2|Manager now in my template I want get value. I try {{node.field_positon.value}} but it return ...
3
votes
2answers
51 views

Unable To See Admin Dashboard, How to Manually change the admin theme

I started developing a custom drupal theme from scratch(http://www.codexworld.com/create-drupal-custom-theme-from-scratch/). In appearance menu below disabled themes, there was a drop-down menu for ...
0
votes
1answer
18 views

Is there an easy way to define a “global” if isset condition on node.tpl.php?

I'm using some custom node.tpl.php files with lots of custom fields. For each field I have to write down <?php if (isset($content['field_myfield'])):?> SOMETHING <?php endif; ?> (It gives ...
0
votes
0answers
8 views

How to wrap the main page block

Back in Drupal 7 I never needed the main_page_content to be a block. Now that I am Working with Drupal 8 I need such a logic for the first time. Is there a way to wrap the main_page_content into a ...
0
votes
1answer
24 views

title in page.html.twig

I find out title is not exists in page.html.twig, and there is a file page-title.html.twig to theme title, then in block section we should use block title. ( ** I don't want use this strange structure ...
0
votes
1answer
14 views

How is it possible for CSS code to be in a false directory but still be used?

I am trying to mimic a theme from another website. I pulled the code / database down and now I have a local copy. The sub-theme this guy is using is fine and correct, all is in order. /var/www/...
0
votes
1answer
19 views

How can i set a variable based on this render element $vars[‘body’][‘#object’][‘vid’];

In trying to learn about theming and Drupal’s alter functions I’m looking at the render array(?) of the hook_node_view_alter function like this: function hook_node_view_alter(&$build) { dpm($...
0
votes
1answer
14 views

Connect Content Type with Related Taxonomy Fields using Template

I have a Content Type displaying correctly using a template, pulling out the fields to appropriate locations. I now want to pull in related information from two separate taxonomies. I have a term ...
0
votes
0answers
20 views

What is the best practise to overwrite CSS?

I'm using drupal 8 and I have to customize already existing theme (downloaded from drupal site). Should I just make changes in specific files in docroot/themes/theme_name or do I have to create ...
0
votes
0answers
18 views

How do i get rid of this enoying extra menu? [closed]

So you can see there is an extra "menu" bellow the admin-toolbar, how do i get rid of it? Thanks in advance!
0
votes
1answer
31 views

Cannot access responsive image sources from Twig

In Twig I am unable to retrieve the file source for each responsive image style on a ImageItem. How should I be getting this information?
0
votes
0answers
17 views

Flush cache does not call custom theme functions

I have a Drupal 7 theme which is child of Bootstrap theme. When I flush cache from Configuration > Development > Performance, the primary menu disappears and the design of a custom menu breaks; when I ...
0
votes
0answers
7 views

Theming mini panel using MYTHEME_preprocess_panels_pane

I'm trying to edit the content of a mini panel using MYTHEME_preprocess_panels_pane but when I use Devel to dsm $variables, I just get data for the pane that holds the mini panel. Is there a function ...
0
votes
2answers
19 views

How do you recycle a css file from a different theme into your new theme?

I really like the form.css from Corolla. I have built a new theme, but would like to reuse Corolla's form.css. Downloaded form.css from Corolla theme Saved it to sites/all/themes/my_theme/css Now ...
0
votes
2answers
26 views

Adding image styles path in page.tpl

i have image upload field in my theme-settings.php $form['fsos_settings']['intro']['hero']['heroImage'] = array( '#type' => 'managed_file', '#upload_validators' => array( '...
3
votes
3answers
43 views

Text (plain, long) automatically has line break converted to <br>

I have created a field Text(plain, long) and have a custom template which currently only outputs this field. {{ content.field_testing }} When the output is rendered, all the line breaks are ...
0
votes
0answers
32 views

Theming blocks individually, by region, or by module [duplicate]

I want to create a bock template for a certain region & a certain module. Drupal 8 does not offer these hook suggestions. In Drupal 7 it was easy to do. I want to create block--[region]--[module]....
0
votes
1answer
19 views

Drupal 8 override administration theme node form css

I need to override some of the styles on the Seven node form. My initial thought is to alter the form and add a custom css file. Is there a better Drupal 8 way to achieve this? Thanks, Dave
0
votes
0answers
34 views

Teaser display showing on full node content page

as my title says my teaser display had been showing up on the full content page of my nodes and we can't seem to figure out "Why". The content type has 2 views and 2 blocks. One view with all One ...
3
votes
1answer
82 views

dump() not working in Drupal 8 (blank page, debbugging is enabled)

I want to use dump() in my .twig template (inside custom theme). The problem is, when I place {{ dump() }} the page is just blank. I have had: Set twig.confing debug: true in services.yml. Cleared ...
1
vote
2answers
39 views

How to render entity referenced nodes field inside node.tpl.php?

I have 2 content types: book and author. This is the structure: I want to use (print) some fields of author content type inside the node-book-tpl.php. How can I do that? Is there a method to ...