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 (6)

0
votes
0answers
9 views

Modifying pager link page numbers

I'm using a solr query from another module which builds the query using $_GET('page')-1 and so I get the same result on page 1 and page 2 of the results. The standard pager gives the pager links as: ...
0
votes
1answer
15 views

Webform multipage - different page.tpl for different page

Is it possible to use specific page.tpl for webform pages? For example: page--form1.tpl for page 1 and page--form2.tpl for page 2. I wanted to do this via URL but it's same on all pages. Any ideas? ...
1
vote
1answer
15 views

Remove label Search terms from Views exposed form

On this site in the sidebar i have a views_exposed_form to search. I need this search functionality to show my search results for restricted pages. How do i remove the label 'Search Terms'. Is it ...
0
votes
0answers
11 views

Render one Paragraphs Module field value inside another Paragraph field's .html.twig template

This question is for the Paragraphs module for Drupal 8. I've created a Paragraph Type with 4 fields: Title, URL, Image, and Description. I want to take the value from the URL field, and use it with ...
0
votes
0answers
23 views

How to add a variable to a twig field template?

On a node page I would like to add a div which adds a mailto link which references another field on the node, e.g. <div class="questions"> <a href="mailto:Joe@example.com?subject=Question ...
0
votes
0answers
17 views

How to add a close/back button from a view B to another view A

I have a view A (filtered but not exposed) with several pages. When the user click on a content of the View A page x, a call is done to another view B (filtered too but not exposed) with several pages ...
0
votes
0answers
9 views

Print layout breaks by using browser function

When i'm printing a page with the print button of the module print everything works fine. But when i'm using the browser function everything is messed up. I've also installed display suite, i ...
1
vote
1answer
28 views

What could cause the site to suddenly start dying with the “Call to undefined function entity_get_info()” error?

So I was working away at trying to solve the problem I asked about in How can I combine the fields of two field collections in my theme? when suddenly Drupal died with this error message: Fatal ...
0
votes
0answers
12 views

maintenance-page--offline template not working

I am following this tutorial. https://www.drupal.org/node/195435. I have created maintenance page and its working with admin configuration site under maintenance setting. I want to create dboffline ...
1
vote
2answers
33 views

Getting the value of a taxonomy term reference field

I have a content type (Movie) with a taxonomy reference (Movie rating) for which can get multiple values. I would like to use the template node--movie.html.twig and get the first value inserted in the ...
0
votes
1answer
14 views

Theming views-exposed-form search block same like normal Drupal search block

On this page, top-right you see a custom views-exposed-form search block. How do i theme this, so it has the same classes and HTML structure as the one below (default Drupal search block)?
-1
votes
1answer
20 views

How to remove H tag from user register form in drupal for SEO purpose

I want to remove tag from user register form in drupal for SEO purpose.How can I achieve it in drupal way?
0
votes
0answers
28 views

Using the Zurb Foundation module

I'm new to Foundation and SCSS, and I'm not sure about using Foundation with Drupal. I've installed the ZURB Foundation module and created a sub theme which I've set to default. I've read the ...
1
vote
1answer
24 views

Add font to bootstrap sub-theme

I use drupal 8, and Bootstrap theme. I created a sub-theme. I would like added one font that I downloaded, to use it in my sub-theme. I read contradictory things to realize it. For example that ...
1
vote
1answer
11 views

How to style/theme an openlayers map block?

I can't seem to figure out how to target the block that my OpenLayers map sits in. I've switched from a Gmap to an OpenLayers implementation, so I already know which styles I want to apply to the Map ...
0
votes
2answers
26 views

Combine several field as a new field

say my custom content type has 3 different fields: max, min, mean. What I want to achieve is group them into a new field say statistics so the new statistics field will have all the values in fields ...
2
votes
0answers
20 views

How to change field value before view sorting

I've got a view where I have to change the value of a field in certain conditions. I managed to change the value of the field before it's printed but It doesn't affect how the elements are sorted. In ...
0
votes
1answer
27 views

Using Twig how can I get the summary of the body field to use in a template?

So I have a textarea with summary and I want to display the summary before the content. So if I just use {{ content.body }} the text is displayed without the summary. How can I get the summary ? {{ ...
1
vote
1answer
33 views

How can I combine the fields of two field collections in my theme?

Update: I really appreciate @NoSssweat's answer, but it isn't what I'm looking for in this case, so I'm still looking for an answer. Please help me better understand how to crawl through and combine ...
0
votes
1answer
36 views

How do I print the {{messages}} variable?

In Drupal 7 I was able to do something like this: <?php echo $messages; ?> It seems this variable is no more in Drupal 8. {{messages}} // This returns NULL on {{dump(messages)}}. I ...
0
votes
1answer
12 views

Added Classes showed in dpm but don't show up in the output HTML

I want to add some classes into my form (node/add/-- form) so I use hook_form_FORM_ID_alter but I don't know why the classes add to my field in the dpm() output but when I check the html output those ...
0
votes
0answers
13 views

Theme a taxonomy term form [on hold]

How would you process to theme a taxonomy term form? I can easily create a custom form an render it, but I would prefer to theme using a .tpl.php. I did find a great link: How to a use a template file ...
0
votes
1answer
13 views

change field value in a view using preprocess_views_view_fields

I'm trying to change the value of a field in a view programatically but i find some problems. first is that even though I created a Global: custom text field which field id is 'nothing', It's ...
1
vote
1answer
24 views

add a template file to custom theme

I've added a new theme to my site and I've added a new content type called code_excerpt. Now, I've created a new template called code_excerpt.tpl.php and added it to my theme folder but when I created ...
1
vote
3answers
41 views

No sub theme folder inside bootstrap theme folder

I just installed Bootstrap 3 theme in Drupal 7, but the subtheme folder is missing. I am new to Drupal and am following online tutorials but no result. All instructions direct me to a sub theme folder ...
1
vote
1answer
36 views

What is the most drupal-like way to bring the title of a single node page into the rest of the content?

This is similar to Considerations displaying page titles in page or node template which in turn claims to be similar to another question, but the questioner doesn't mention how they achieve what they ...
3
votes
1answer
34 views

Multi level menu in Drupal 8?

I've created a multi-level main menu in Drupal 8, all levels need to show by default (they are revealed on hover/tap). Unfortunately when adding this menu as a block, Drupal states: The menu will ...
-2
votes
1answer
21 views

How do I get the value of fields in a template?

I have created a custom template for a view called, say, "Example": views-view-fields--example--page.html.twig This works fine. I can display the title of each item in the template thus: {{ ...
1
vote
2answers
28 views

How to output view content as grid in custom template?

I have created a view for content type xyz with fields F1, F2,F3,F4. I open the group "advanced", clicked on "Theme: Information". There are couple of template files, that are used by view. I ...
3
votes
1answer
81 views

Hide node title on front page using template.php not css

I'm building a drupal 7 bootstrap sub theme and want to hide the title of the nodes if there on the home page. I don't want to use css as its only hiding it I want to have the titles not render at ...
1
vote
0answers
24 views

How to get user edit form in mini panel?

Could you, please, explain me how to get user edit form in mini panel ? I need to replace standard user edit form and to do it in block but have some problem with that - it seems that nothing happens. ...
0
votes
0answers
13 views

Views/Twig/token error when trying to enter a custom URL

I'm creating a view that shows a list of "articles" with a contextual filter, "organization", to be shown as a block in the organization detail page. I configured the filter so that it grabs the ...
0
votes
1answer
24 views

Static resource URL in Drupal 8 theme

I'm trying to place an image using a local resource in theme. Using the site url like drupal.localhost/themes/customtheme/images/image.png does give me access denied error. I understand that Drupal ...
0
votes
0answers
11 views

Replace the text of a link of menu by an image [duplicate]

I use Drupal 8. For one of my menus, I would need to replace the text by an icon (and thus more have a text). Do you know a solution?
1
vote
2answers
40 views

How to generate custom template for views page

I have created a view for content type xyz and added fields like title, body,image,designation, etc. I want to enclosed every single field of view in html structure, so that I can see all titles in ...
0
votes
0answers
29 views

I want to use an argument from the path in a twig template (as a html class)

Having read about how D8's path system is different from D7, and having seen some 'simple' examples, I have tried setting a path variable in a preprocess functions and outputting that as a {{ ...
0
votes
2answers
52 views

Customize user login block

I've been playing around with Drupal 8 since about a week. A couple days ago I tried to design the user login page to my needs but I couldn't quite do it. My problem is the following: I want to ...
0
votes
1answer
31 views

Print node URL in a custom block template

I have a custom block that loads multiple nodes from the database and passes it to the twig template. Inside the template I loop the list printing some node details, but I need to create a link on the ...
1
vote
1answer
26 views

How to display the user email on account pages?

On the user account page all feilds are displayed except for the email. I have tried to modify the user-profile.tpl, and added print $user->mail but it displays the logged in user and not the ...
1
vote
1answer
61 views

How to add icons to a menu?

I use Drupal 8. I would simply want to add icons to one of the menus with a <span>. Have you runways?
1
vote
1answer
24 views

creating custom page template

How do you create a custom page layout in Drupal 8? In drupal 7 you could do something like page--about.tpl or something. How do we do that in drupal 8?
0
votes
1answer
25 views

Add text and Links to views slideshow image carousel

I would like to add text and and links for each image in my slideshow banner similar to this one prototyped by me: These are my current settings in Views:
1
vote
3answers
39 views

Create a template for a specific view

I have a view containing an unformatted list of fields. I want to create a specific template for the view. I have turned on Twig debug, but it suggests 'views_view_unformatted' for the file name, ...
0
votes
1answer
32 views

Additional twig suggestions for menus in Drupal 8

Unlike other elements, the base twig suggestions for menus are only "menu.html.twig" and "menu-[menu_name].html.twig". I am aware that I can generate additional suggestions through the hook ...
1
vote
1answer
15 views

Base theme no longer recognized

I recently inherited a Drupal 7 (7.39) site using an old version of Omega 4 (beta7) and a custom subtheme. All was well until this morning, when cron got stuck. It unstuck itself before I could start ...
0
votes
1answer
15 views

Mouseover overlay for images using Views Photo Grid

Trying to add a hover overlay for node title and a couple of other fields for images using the views photos grid module. The fields to be used in the overlay need be excluded from the display as ...
-4
votes
1answer
35 views

How to select a specific row in views-view.tpl.php? [closed]

I'm customizing a specific views block and trying to separate the 2 first rows in a "top" div(wrape it)
1
vote
1answer
38 views

Can I reference field item & label in node.html.twig?

In Drupal 8, I defined a content type (say example) and made a separate template for it: node--example.html.twig. I wonder if I can reference the item or label of a specify field in ...
1
vote
1answer
20 views

Change weight of CSS file loaded in custom module with #attached?

Im working on a custom module which loads a CSS file: $content['#attached']['css'] = array( path_to_theme() . '/new.css', ); How can I change the weight of the file so that its loaded after the ...
0
votes
0answers
14 views

Theming custom Apache solr results

I am making a custom apache solr query using apachesolr_drupal_query("custom", array('q' => ''), '', 'search/site') and getting the results processed using the function ...