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

learn more… | top users | synonyms (3)

1
vote
1answer
16 views

Send email from template file

I am making a return request page for my website the user will enter in his/her information about their order and it will pull up a list of their order. The information is pulled from the views then ...
0
votes
0answers
11 views

How does the content_type_field.tpl.php overrides the template views?

I have a tpl page named content-field-field_p_customcode.tpl.php and the tpl page reside in drupal\sites\all\themes\sky\content-field-field_p_customcode.tpl.php . and this file have content like ...
0
votes
0answers
10 views

Cannot display image thumbnail when uploading photo

I am doing everything by examples, but can't display my custom theme for displaying thumbnail when uploading images: function act_profile_page() { $form = ...
1
vote
1answer
25 views

How can I distinguish the first image in an image field in a Twig template?

I have a custom field formatter for an image field. The Twig template for the image field is the following: {% for item in items %} {{ item.content }} {% endfor %} Each image is then formatted by ...
0
votes
2answers
23 views

How can I add rows to grouping in views?

I have a view that lists terms from two different vocabularies (Product Categories, and Traits). The Product Categories vocabulary looks something like this: Sweet Corn Type 1 Type 2 Onions ...
0
votes
1answer
10 views

Design concern with custom tpl.php

I have a custom tpl.php for my custom content type. As part of its content it also needs to show a (dynamic) value. The dynamic content is actually scraped from another website of ours. My concern ...
0
votes
0answers
17 views

Modify search result (Display Suite search)

Second day and I don't see solution for my problem. I want to modify the output of a single search result. Yesterday, after ~8h (?) I understood that search-api-page-results.tpl.php overrides ...
0
votes
1answer
16 views

Printing printer friendly version of nodes in bulk

My scenario is this, a user selects a bunch of nodes and selects to print all the nodes. What I'd like to happen is, once the user clicks the print button, the print dialog opens up and all the nodes ...
0
votes
0answers
13 views

Can I call specific fields and field groups in a node.tpl using Ajax

I'm building a fairly large content type and some of what's in there doesn't need to be loaded until the user asks for it. Is it possible to not load certain fields and field groups in the content ...
0
votes
1answer
38 views

Create node template only for default view-mode

I created a node template for my content type which I only want to use for my default view mode and keep the standard view of the teaser. My file is named like node--customnode.tpl.php. As I read I ...
0
votes
0answers
13 views

Mega Menu in Adaptive theme feeling like mobile

So, what went wrong - as I was changing my Zen template to similar Adaptive template - my Mega Menu on Adaptive theme is grouping all items left, in a narrow space, like on a mobile screen, even I am ...
0
votes
0answers
9 views

custom field collection in view (style output) template drupal 7

I use the module Field collection and Field collection table to display some data as a table. I created a page to display the fields in the field collection of me. I need to customize the theme ...
0
votes
1answer
19 views

Rendering Content Multiple Times in a Node

I'm starting to dig deeper into themeing and I'm thinking maybe I'm misunderstanding something. Basically I want to break apart the way the content is laid out in my node--example.tlp.php file. I've ...
0
votes
1answer
34 views

Recommended techniques for changing the appearance/design of my Bootstrap sub-theme?

I use Bootstrap (7.x-3.0 for Drupal 7 which I already created my own sub-theme and I enabled this sub-theme as my default theme. It seems to work so far. Now, I want to change the appearance/design ...
-1
votes
0answers
20 views

Problem in manage display in content type [closed]

I used semantic ui template but there is one problem, please help me;
1
vote
1answer
29 views

Item pagination - fatal error: allowed memory exhausted

I have an $items array that I was displaying with my template file. Now I want to add a pagination, therefore the code looks like this: $current_page = pager_default_initialize(count($items), 4); ...
0
votes
0answers
7 views

Why drupal_find_theme_templates return empty array?

I trying to add templates to my module (for Drupal 7) with next code: function transfer_theme_registry_alter(&$theme_registry) { $module_path = drupal_get_path('module', 'transfer'); ...
0
votes
1answer
18 views

Show title of referenced node in node template

I'm working on a node template for my content types and use Entity reference to reference my content with each other. THe machine name of my entity reference field is og_group_ref. In my node template ...
0
votes
0answers
19 views

Warning: Creating default object from empty value in include() (line 12 of C:\wamp\www\5\sites\all\themes\pinboard2\page.tpl.php) [closed]

I installed pinboard theme on wampserver and all time it give me that message Warning: Creating default object from empty value in include() (line 12 of ...
0
votes
2answers
29 views

(Views) How to style an image field conditionally based on term

I have a Drupal website in which there is a content type named Article. In that content type, there is a taxonomy field called "Topic" which is term reference field pointing to a vocabulary called ...
0
votes
0answers
12 views

How to override a file field on webform form?

I have a webform with a file field printed on an overrided webform template like this: <div class="field-archivos"><?php print drupal_render($form['submitted']['archivos']); ...
0
votes
0answers
13 views

themed node add form cannot render form properly

I would like to theme a node add form with the id of "project-node-form". I followed the steps I found online too add the hook theme code in the template.php under the theme and there seem to be ...
0
votes
2answers
39 views

Drupal 7 theme for specific page

I have one page mortgages/%/view that needs to have it's own custom theme. I have the HTML created and it's ready to go. In my 'mortgage' module I have a mortgage.tpl.php file with this HTML in it. ...
1
vote
1answer
15 views

Previewing another template online?

Always when I want to check another template on my online site I have to download it to a local server, fix the blocks in that template, and set it as default. Only by that I could check it without ...
0
votes
2answers
27 views

Where does the variable for the left sidebar get set in Drupal 6?

I have a Drupal 6 site where I've added a submenu for a new set of products: products -old products set 1 -old products set 2 -new products set --new product 1 --new product 2 --new product 3 that ...
1
vote
1answer
11 views

Custom tpl.php for custom content types rendered through another tpl.php

I have a custom module which displays multiple content types in tabs. My module uses a custom tpl.php which renders the tabs and the contents(of multiple types). The challenge is to have custom ...
0
votes
1answer
24 views

template (tpl) file for comment view mode?

I created a new view mode for comments called "cool". click the image below for full size. I created comment--cool.tpl.php and added to my theme template folder. Based on this other question ...
1
vote
1answer
16 views

Altering the Title of node using Preprocess

I am trying to alter the page title of history content type using this function function mytheme_preprocess_page(&$variables) { if(isset($variables['node']) && ...
0
votes
1answer
20 views

menu item call from tpl file

I have create one form in .tpl file with simple html form tag. In action attribute of this form element i passed a url like 'action=savequestion'. Now in my .module file, inside hook_menu(), I am ...
0
votes
1answer
18 views

Creating a template file for one specific page created by a custom module

How do I call a custom theme file (stored in the theme folder) that displays on a specific page that is created by a module. It's a module for viewing mortgages in a full-page view. The template file ...
0
votes
0answers
18 views

Unable to see view page when click page link in Drupal admin views created list section?

I have created a view both page and block both are working in with out admin login section in my home page but after login when I click page link not getting view list page. Please find below ...
0
votes
1answer
18 views

How do I load specific page template for /store-locator

I want to control the region the store locator and panel being placed into. I was hoping I could just use a content-type page .tpl to move things around within the rest of the layout, but that doesn't ...
0
votes
1answer
9 views

Use taxonomy_get_term_by_name when there are duplicate names across multiple taxonomy categories

UPDATE: I see that most likely the best way to accomplish this is to grab the term id from $content['field_tags']. However I'm not sure how to do that. Whenever I retrieve ...
1
vote
1answer
21 views

how to refer to fields with multiple values in node--content-type template

I currently have a template for the article content type. node--article.tpl.php contains: <?php print render($content['body']); print render($content['field_file']); print ...
0
votes
3answers
26 views

How to find which templates are affecting a display?

spending hours dealing with form_alter , finally realized that a tpl.php file is overriding the output !!! now the question is what are the ways to understand which template files(or functions) ...
0
votes
1answer
34 views

Create pager from db_query

This my SQL query to fetch the details. $query = "SELECT DISTINCT TITLE, PID, TYPE, SUM(DAYCOUNT) AS tot, ROUND(SUM(DAYCOUNT)/( SELECT SUM(DAYCOUNT) FROM REPORT_LIST_VIEW), 4) AS per ...
0
votes
2answers
30 views

Drupal 8: Template suggestion for form-element in a views exposed filter is not working

In Drupal 8 I am trying to add in a suggestion via hook_theme_suggestions_alter() like so: function ua_sc_theme_theme_suggestions_alter(array &$suggestions, array $variables, $hook) { print ...
0
votes
1answer
9 views

Naming Structure for Create Node Page template?

I need to create a custom template for: /node/add/node It's currently using: page--node.tpl.php What's the file naming convention for this?
0
votes
2answers
12 views

Add html5 placeholders to node_add inputs

I'd like to add placeholders to node_add field inputs. I'm trying to use dpm($form) but am not sure where to put it. I couldn't get node-add.tpl to work with this function MYTHEME_theme() { ...
0
votes
1answer
18 views

Unable to render posted date in node--article.tpl.php

I'm attempting to render the posted date of an article in a specific way. I understand that there is a Display author and date information. Checkbox in the content type editor. However I don't ...
0
votes
1answer
29 views

How to use preprocess function for custom templates defined in hook_theme?

I have a custom module that i've created and I have set the theme template like this: /** * Implemtnation of hook_theme() */ function custom_slider_theme($existing, $type, $theme, $path) { ...
0
votes
3answers
40 views

placeholder on searchbox

here is my template.php code: function sizin_preprocess_page(&$variables){ $search_box = drupal_render(drupal_get_form('search_form')); $variables['search_box'] = $search_box; } ...
0
votes
1answer
22 views

Unable to implement photo slider in theme template

I downloaded a theme from here and I chose this theme because I wanted to builder a slider photo gallery as shown in the screen shot here. However, I am unable to achieve the desired effect because I ...
2
votes
3answers
110 views

Using Panels for Layout vs. custom .tpl files

I'm working through some layouts that aren't entirely complex but are definitely outside of the core Drupal provides. It really does seem like there a 20 ways to do one thing in Drupal. My question ...
0
votes
0answers
11 views

How to create tables for multiple fields in the “node add form” template

How do I create a table for fields in the "node add form" template as image below
1
vote
2answers
28 views

Field collection with condition node tpl

I've been researching this for the last few days and I cant find a clear explanation of this issue im facing. I'm receiving an error when a node has an empty collection with no values. The ...
0
votes
2answers
66 views

Bootstrap theme - add or remove classes in $navbar_classes

I'm using the bootstrap theme, by default in page.tpl.php the nav bar is outputted like so: <header id="navbar" role="banner" class="<?php print $navbar_classes; ?>"> Where can I edit ...
0
votes
2answers
36 views

preprocess_page if front

I have a preprocess_page function that applys classes to my content if there is a sidebar or not. if ($vars['page']['sidebar']) { $vars['content_classes'] = 'cool-class'; } else { ...
1
vote
0answers
19 views

override the HTML of a single menu block

Good day all. I'm new to drupal, and I could use a little help. I got the override idea, and I try to stick to this, now, I have a menù, on the upper part of the site, that needs a different HTML ...
2
votes
1answer
41 views

hook_form_alter based on path

I don't know if this is possible but could I do something like <?php $foo = current_path(); print $foo; ?> in page--foo.tpl, then something like function ...