Theme templates are part of Drupal's theming system and allow for the customization of Drupal sites.

learn more… | top users | synonyms (3)

0
votes
0answers
26 views

Print node title and description in html.tpl.php [on hold]

I am trying to display an articles title, description, etc in the html.tpl.php file. I need to do this for an analytics service. I can not use the meta module which everyone points to. I was following ...
0
votes
0answers
26 views

How can I make page variables available to my region template

I have a region TPL file named: region-header.tpl.php <div id="nav"> <nav class="navbar navbar-default" role="navigation"> <div class="container"> ...
0
votes
2answers
21 views

How do I include jQuery scripts at the bottom of the <body> tag?

I want to include a JavaScript file at the bottom of the <body> tag, and I only want to include it for a specific node type, but my node.tpl.php file's content is only wrapped by ...
0
votes
1answer
21 views

URLs getting duplicated for the same node

Yesterday, I found a strange behavior with my drupal site. I noticed all the nodes are getting duplicated like this: Original node's url will be www.livesite.org/?q=node/2 And when I append ...
1
vote
1answer
33 views

Test if template files (.tpl.php) are used by theme

I've inherited a custom Drupal 7 theme with many template files. I'm sure lots of them aren't actually used by the website, and were part of the testing process. Is there a method to list which ...
0
votes
1answer
25 views

Can a Drupal site design (not just colors, fonts, etc — template stuff) be replicated over multiple drupal sites?

I will apologize in advance for using the L word...but in Lotus Notes there is the concept of a Template file that holds all the design elements of a database...fields, views, forms, etc. -- has a ...
0
votes
2answers
27 views

Combining fields in preprocess template

I want to combine two fields (say first name and last name) of a particular type of node so that the name displays correctly and I still have the individual fields to work with in different areas. I ...
0
votes
0answers
28 views

Is there a way to retrieve DRUPAL TWIG template's with core drupal 8 javascript functions like twig.js?

Is there a way to get precompiled twig templates from drupal 8 ? Example : Drupal.getTemplate('my-template.twig')(data); Thanks.
0
votes
2answers
31 views

Drupal aligning blocks and content next to each other

i have a view page and two blocks which i want to display next to each other. I want view content on left and two blocks on right, with one block on top and other just below it. But i am having ...
0
votes
0answers
16 views

Retrieve select option value in webform-mail.tpl.php (7.x-4.x-dev)

I have a custom mail template in Webform so values can be in a table for copying/pasting into Excel. I want the value of the select option fields instead of the key (doing manual entry for webform ...
0
votes
1answer
20 views

Drupal 7 customize profile2 module profile edit form using template method

How to customize profile edit form of profile2 module using the template method ? Profile2 has main profile, and set to provide a separate page for editing profiles. ...
1
vote
0answers
19 views

How to NOT show link title, if link title is left empty

Using the link module I have one link field with the setting "Link Title > Optional Title". This allows users to enter a link url without entering a title. The problem is, the (empty) title is ...
1
vote
2answers
48 views

Custom page template for specific node - template inheritance

I'm trying to customize the page template for a specific node of a specific content type. This is what I have: Content type: Custom Page Node ID: 2 First, I need to customize all 'Custom Page' ...
0
votes
1answer
27 views

page--front.tpl.php not working [duplicate]

I have omega 4 installed as my sub-theme, in which i have a custom layout. Now i am trying to make my home page custom, for which i have defined page--front.tpl.php in my templates/system folder, but ...
0
votes
0answers
21 views

how to override output in preprocess function

I am trying to override the path of events created by the fullcalendar module. I am having some issues, and came up with a very general Drupal question: In a preprocess function, I can modify the ...
0
votes
1answer
40 views

Create a landing page as the front

I have created a content type called 'landing', however when I try and setup this as my homepage config/system/site-information to the alias 'landing' It takes on the node--front.tpl.php as the ...
0
votes
1answer
26 views

Build custom module with similar maintenance mode behaviour

I'm building a custom module that denies access to the site based on some custom rule. I;ve already build the module form, variables get stored, in hook_init I do my check against the variables I set ...
1
vote
1answer
59 views

How to render a template in Drupal 8

I am trying to render a template in Drupal 8. In Drupal 7, I would create a theme with hook_theme, make a templates directory in my module, drop the template file in and I could display it with ...
1
vote
1answer
41 views

Drupal 8 set homepage template

How do I change the Drupal 8 home-page template, so it uses a different template from the regular page.html.twig template?
0
votes
1answer
30 views

variable in HREF not working correctly

I am trying to create a link in a Drupal views-view-fields.tpl that links to the original content but for some reason it's not working. The code I have tried: <a href="<?php ...
0
votes
4answers
87 views

How do I get a view to display as themed within a simplenews html email?

I am trying to create a simplenews newsletter, also using Simplenews Scheduler, to weekly send out a newsletter with the content defined by views. I have a content type set up, and the views defined. ...
0
votes
1answer
25 views

Why I can not find some css with grep? [duplicate]

I'm newbie and I don't know how Drupal 7 work! I want to remove with and height from below code: <img typeof="foaf:Image" ...
1
vote
1answer
36 views

How to show all template suggestions for a page without using Devel Themer?

For some reason the Theme developer module doesn't work on my site (whenever i activate it and navigate on my site it just shows a white page with written "Jump to main content"), but all I want to ...
0
votes
1answer
21 views

Enumerate content in custom view template

I am very new in Drupal. I am using Drupal 7. I would like to create a custom rendering for a view I have created. Thanks to many posts found on the internet I have already done the following steps: ...
0
votes
1answer
56 views

Access denied error after login

When i log in to drupal doesn't matter with any account either admin or normal user. I get error Access Denied. I then again try to login and it works fine. What is that problem? My theme was shipped ...
0
votes
1answer
89 views

How to theme form elements in a custom field widget?

I'm creating a custom telephone field and I'm a bit confused at how to go about theming the widget. I have four elements in my implementation of hook_field_widget_form()... A dropdown for the ...
0
votes
1answer
14 views

How is this themed when using views

I have a single page template...there are 5 sections, each powered by a view bound to a single content type. The first section has a dark blue background, the second green, third red, etc... each ...
0
votes
1answer
25 views

Cannot replace html.tpl.php with new template in a single module

I am creating a module to handle the reformatting of pages for printing in D7. The structure of the URL is: /print/{nid} I need to use a separate template than html.tpl.php as I have to get rid of ...
0
votes
1answer
26 views

Add CSS class to <form> element using webform and template file

I have an existing webform in Drupal 7 which I am trying to theme. So far I managed to add CSS classes, placeholders, prefix, suffix,.. to form elements (fields) but not to the actual ...
1
vote
1answer
37 views

Which is the most performant way of overriding views field output

This question sureley can only be answered by people with some drupal experience. As I have quite different and complex views, which I need to control totally, I need to come to a design decision. ...
0
votes
0answers
35 views

Custom widget for field collection with multiple values

I need to create a custom field widget for a field collection. My field collection is called Article and has the fields "Title", "Summary" and "Description". My content type has the field of type ...
0
votes
0answers
16 views

Template Hierarchy for Panels

In Drupal, the template system has hierarchies for different parts of the system. I'll include what I've found so far as a reference; For pages: page-node-edit.tpl.php page-node-1.tpl.php ...
0
votes
2answers
41 views

How to add custom theme region only to a custom module's template(and not page.tpl)

I want to define a region, but the problem is that for different pages, the position of the region would be slightly different. So I can not put the region in page.tpl and for different custom modules ...
0
votes
2answers
37 views

Drupal - user registration form- theming

I need to do theming of user registration form I m doing in this way Module file function mymodule_form_user_register_form_alter(&$form, &$form_state, $form_id) { ...
0
votes
1answer
22 views

View mode theme name priority

I am on Drupal 7. I have a theme set for view mode 'Teaser'. The theme name for this is named like this: node--teaser.tpl.php. So far so good. Then I created content type 'something' and I would ...
0
votes
1answer
25 views

Don't show a field if it is not filled in

What is the best way to don't show up a field if it is not filled in. I have a content-type for the homepage: (Machine name: home_pagina). There is a field for my client to give a warning-message if ...
0
votes
1answer
37 views

Theming a node teaser to use its content types's custom tpl.php

I have a page--contenttype.tpl.php in a custom theme that displays a node exactly how I want it to display on its own node page. How do I make it so that the teaser for the node of that type displays ...
0
votes
1answer
17 views

How can I embed view results right in the content region as if it's part of the content?

I have a node type with some entity reference fields that displays teasers. I also have a block view that takes a URL component to display related nodes that are not referenced on the node's entity ...
0
votes
1answer
42 views

How to theme the separate page for editing profiles provided by Profile2

I'm using D7. I'd like to theme the separate page for editing profiles provided by Profile2 module(whose URL is MYWEBSITE.com/profile-MYPROFILE/[uid]/edit). I searched and found the way that somebody ...
0
votes
2answers
41 views

Replace Views prev/next pagination with image arrows

Is there a template that would allow me to replace Views' prev/next text pagination with image arrows instead? I could do it with CSS but I don't feel that is ultimately an optimal solution.
-1
votes
1answer
22 views

How to add a new element in drupal 7 feed view

I have created a simple feed with drupal 7 views and i want to add some more elements. currently it supports title, description, link, creator and pubdate. I DON'T want to use any other module. Thanks ...
1
vote
1answer
33 views

Display a node form in default theme for admin

I think this question has been asked many times, but I am sorry not to find a working solution. May be I am doing something wrong. I want to display a specific node form in my default custom theme and ...
0
votes
2answers
33 views

My Theme Is Lost [closed]

My theme was working earlier, now when I go to the site, it just shows a basic homepage without the theme. I looked at the files and they are all there including the page.tpl.php file. Not sure what ...
-2
votes
2answers
60 views

How to call hook in template.php after login from any user in drupal 7?

I am using below code to get the user login gender information & store in SESSION, I want to call below code after login, I already try this hook function bartik_user_login(&$edit, $account) ...
0
votes
1answer
23 views

add class to book navigation block links

I use navigation block generated by block module. Tha block is displayes on all pages that belongs to book. I would like to add custom class to all links inside navigation block. I found that the ...
0
votes
1answer
26 views

Image does not load

I bought a theme from themebrain site and installed it. Some of the images for the theme are stored inside /sites/default/files/customs/. So in image tags, I refer to the source location as ...
0
votes
0answers
11 views

sub-menu not loading in custom menu

<?php $menu_name = 'menu-menu-secondary-menu'; if (count(menu_navigation_links($menu_name))): ?> <?php print theme('links', array('links' => menu_navigation_links($menu_name), ...
0
votes
0answers
30 views

How to Render items from $view->result in template

So in a certain template i file is use the following code to render my images: <?php $results = $view->result[0]->field_field_images; ?> <?php foreach ($results as $delta => $item): ...
0
votes
1answer
28 views

My theme is automatically disabled!

My Drupal website has a sub-domain. there is a theme that is in the sub-domain folder. the settings.php in the sub-domain folder is same as the one that is in the /default folder so they both display ...
0
votes
1answer
47 views

Different front page template for different domains

I have Drupal 7 installation with the Domain Access module. I need to have different page--front.tpl.php templates for some of the subdomains, for example: www.example.com should have one type of ...