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
1answer
4 views

Unable to render menu in theme

I'm creating a custom theme in Drupal 7 but I'm having trouble getting it to render the menu I'm using the following code in page-front.tpl.php <?php if ($page['main_menu']): ?> <div ...
0
votes
0answers
13 views

How to render a DS fieldgroup programmatically in a node template?

I am overriding a Display Suite view mode of a node using the template suggestion myLayout-node-myNode-full.tpl.php. I am getting the $node->content using the node_build_content function. Then I have ...
0
votes
0answers
7 views

How to access replacement tokens present in views field rewrite output in its .tpl file of that field

I've created a view and I want to manipulate the field output to show bar graph instead of field value. I'm using bootstrap 3's progress bar as the bar graph, but I'm unable to set width of the ...
0
votes
1answer
5 views

Template file for Views exposed filter block

Views has a great feature where you can expose the exposed filters as a block (Exposed form in block under Exposed form). So what's the "standard" way to theme these? Is there a Views template for ...
0
votes
0answers
10 views

Print Profile 2 Field in page.tpl.php

I have a page--*.tpl.php where I want to print some field from my user profile 2 profile. I am currently doing it like this: <?php print render($profile-type->field_name['und'][0]['value']); ...
0
votes
1answer
18 views

How to make custom template for search results

I have developed a custom search module that is working perfectly. Currently I am using the existing "search-results-tpl.php" and "search-result-tpl.php" for showing search results. But I want to make ...
0
votes
0answers
3 views

How to make a node sticky only in a given Taxonomy Term?

Content Type: Book (with Field: Term Reference->Subject) Hierarchical Taxonomy: Subjects Science --Chemistry --Maths --Biology Engineering --Civil --Electrical When I create a node (Intro to ...
0
votes
1answer
15 views

How can I create a view that displays the most popular nodes based on an outgoing link?

The link is a text field that's value is pulled directly in node.tpl: <a class="list-parent-link" href="<?php echo $node->field_download_link['und'][0]['value']; ?>"> I'd like to be ...
0
votes
1answer
30 views

How can I create template for specific page in module?

I am completely new to drupal, and just started learning. Here's my issue: I have created a module, called 'doom'. It has only one form. I would like to remove all the default elements ( header, ...
0
votes
1answer
20 views

Changing URL alias of webform breaks template

I created a webform with a URL alias of contact-us. The edit URL is http://local.mysite.com/node/1/webform. I have two custom templates, page--node--1.tpl.php and webform-form.tpl.php. Everything ...
0
votes
0answers
11 views

when theming exposed filter in view template .. ajax not working

when I try to put my view exposed filter inside a div in view template .. filter ajax stop working: the original code: <?php if ($exposed): ?> <div class="view-filters"> <?php print ...
0
votes
1answer
24 views

Theme change by url [duplicate]

Pretty new to drupal. I will have roughly seven themes and looking for the best way to change themes by url... xxxx.com/parents = one theme xxxxx.com/edu be another theme xxxx.com/daily will be ...
0
votes
1answer
32 views

How to implement template file that would reside in database?

I was wondering if it would be possible to have a template "file" that would be stored only in DB and would not exist physically? Twig tempaltes are parsed from files only once and they are processed ...
0
votes
1answer
25 views

Custom Markup to item in views

I created a view that displays my user profile picture. I created a template for this view using 'views-view-fields--name.tpl.php. This is the output I get. <div class="view-content"> ...
0
votes
1answer
26 views

How to link to section in same static page

How to create a menu link to the section that will display when I click on the link and hide when i again click on the link.. link is <a href="#contact" ...
1
vote
1answer
17 views

Display Suite Custom Template Issues

I've been using Display Suite for Drupal 7 (with Bamboo theme,) and I'm trying to build a layout template that contains 5 rows, so I can place the appropriate fields into each row, making all content ...
0
votes
1answer
21 views

Views: Add class to body based on Views

In Drupal, every Views page has a class that is stored in $css_name (inside views-view.tpl.php). Is there are any way to get this class to appear in the body class of the page? Ideally, I would ...
0
votes
2answers
37 views

appling different styles based on taxonomy

I have a site with 120 categories of content. I've used taxonomy to make these categories. now I need to have some different styles base on the taxonomy which is used in nodes. OK? how can I do it. I ...
1
vote
2answers
11 views

How can I insert a variable from a preprocess function in template.php to Block Body in admin

Seems like a pretty easy thing to do, but I am having a hard time in using a variable from function theme_preprocess_block(&$variables, $hook) in template.php in a Block body in admin. For ...
1
vote
2answers
36 views

Call $created variable in content type node template

How can I call the $created variable in my content type node template? I tried the following but it just produces what seems to be a random string of numbers: <?php print render($created); ...
0
votes
1answer
22 views

Picture linked to user's profile in user-picture.tpl.php

D7: In my user-picture.tpl.php template I have the following code: <div class="user-image"> <?php $user = user_load($account->uid); print theme('image_style', array('style_name' ...
0
votes
0answers
29 views

print child's of the current term with hierarchy

just terms. No nodes... For example we have this structure: Fruits -yellow --banana -red --apple --strawberry Vegetables -green -red -orange But, if user now in term page Fruits -> ...
0
votes
1answer
21 views

Why is theme.inc looking for view template in calendar module

So I am working on updating a drupal site that was very out of date, I have updated everything to the latest versions. When I updated the Calendar module things started going awry, now most of my ...
0
votes
1answer
17 views

Mark New Nodes in Views via Template

I have a portfolio view that displays all items in the portfolio. The fields are set via template so I do not have access to the fields area in views to select the parameter there, I have to do it ...
0
votes
0answers
13 views

How to render / preprocess list of entity reference nodes?

I hove a content type that editors can 'attach' related nodes to. When I 'theme' / 'style' nodes of this content type through view mode everything is basically fine: the related nodes are rendered ...
0
votes
1answer
23 views

How to theme regions in non-standard themes like Consilium?

So I'm stuck with a theme that is very difficult to work with because it is nonstandard. It seems like it would like to be Omega and put lots of functionality into the admin UI and out of template ...
0
votes
0answers
15 views

How to have a stack of (frontpage) views to choose from?

Currently I have a draggable view that lets content editors 'compose' a frontpage. The listed nodes are basically just consisting of an image, a title and a link (entity reference) bound together to a ...
0
votes
1answer
12 views

Load a Module versus JavaScript embedded in Theme

I am new to theming Drupal and I am trying to create a responsive website based on Bootstrap with an image slider at the top. I know that there are modules like Views Slideshow and FlexSlider. ...
0
votes
1answer
20 views

How to grab the values of field collection items in a template file?

I have a field collection field_plaats_en_aantal with two fields: field_plaats (text) and field_aantal (integer). I'm currently displaying this field collection in a node view as an unordered list: ...
0
votes
0answers
20 views

Error with admin UI on /admin/structure/block

There's an issue with my /admin/structure/block page where the default Seven theme isn't styling the page and the code is generating the No blocks in this region message for every single region even ...
1
vote
2answers
47 views

Getting “--> ;” on front page after editing custom html.tpl file [closed]

I am newbie and using Drupal - 7. I have added script tags into my customized html.tpl file. <script async ...
0
votes
1answer
20 views

Custom theme function and template suggestion

I'm trying to create a theme function, with a template: /** * Implements hook_theme(). */ function mycustomtheme_theme($existing, $type, $theme, $path) { return array( 'custom_function' => ...
0
votes
1answer
19 views

Views Data Export print feed icon in template file

I created a template for my view (views-view-fields-xxx.tpl.php). On my view page I use the 'Views Data Export Module' to export filtered views in XLS format. I cannot figure out how to display the ...
0
votes
1answer
19 views

Node Type in Views Template

I made a custom template for my view to print fields into a custom html syntax. The problem I have is that in the view I am calling all content types. Now, in my template file I want to display ...
0
votes
1answer
19 views

Changing date format in node template

I have a content type called news which I created a template for, node--news.tpl.php. In my template, I call the date field as follows: <?php print render($content['field_news_date']); ?> It ...
0
votes
2answers
40 views

Display different fields depending on field value in node template

I have a field named field_event_type. When creating a node, you can select one of two options for this field from a drop-down list: birthday party Wedding I want to be able to display different ...
2
votes
1answer
39 views

How to use AJAX form on custom maintenance page

I have been working to customize our maintenance page via custom template and hook_preprocess_maintenance_page(), the intent is to provide the maintenance message, some static text, as well as a basic ...
0
votes
2answers
32 views

Print Link field in View template

I have a 'Link' field that is entered in plain text by user. I am trying to display the raw value of this field in my views template. I did dsm($fields); in the views template. For the field, the raw ...
0
votes
1answer
28 views

printing file entity fields in a node.tpl

I have some fields in a file entity type. Now I need to print some of these fields directly in a node.tpl. How can I do this?
1
vote
1answer
22 views

Move fields on User edit page between pages

I am using Simple News, which changes the user/1/edit page by adding a new "Newsletter' Page" that is at user/1/edit/simplenews ("1" can be any userId). This page has a Newsletter option field. I ...
0
votes
0answers
21 views

file path/url in file entity tpl

I have a tpl file for file entities of type image: file--image.tpl.php. In this file I use $file_url to get the url of the file. But I'm not sure if this is correct. This Drupal installation we have ...
0
votes
0answers
13 views

Overriding specific Omega_Kickstart css files in subtheme?

Commerce Kickstart 2. I created a new theme, which is basically a copy of the commerce_kickstart_theme. So it's a subtheme of omega_kickstart which is, itself, a subtheme of omega v3. Even though ...
7
votes
1answer
122 views

Where to render? Preprocess or template?

We are constantly improving our coding performance and we are monitoring every page load to optimize loading en rendering times in our websites. Above statement in mind, I stumbled upon the question ...
0
votes
1answer
41 views

Drupal HTML.tpl.php file won't affect site?

My aim is to allow zooming in and out in mobile devices in my responsive Drupal 7 site. I have followed a Drupalize.me video and some more documentation that teach how to allow it via my theme's ...
0
votes
0answers
16 views

Show “item-list” in my customized login page in Drupal

I have to create a customized login page for my site, but the problem is that login page doesn't include <ul class="item-list">. The problem is that a list with a tag of item-list is being added ...
2
votes
1answer
58 views

Drupal custom page template based on the title of the page

I have the following page: About us Whose path is: site.com/node/6 Theme suggestions for the template files are: page--node--6.tpl.php page--node.tpl.php You should already know that it is ...
-1
votes
2answers
20 views

Is there a way to make a unique view template for a specific type of view?

I needed to edit the views-view-unformatted.tpl.php for a specific view, however I'd rather it not apply to every view. Is there a possible way to make a unique view template to select from? Rather ...
1
vote
0answers
17 views

Two Column Drupal Commerce Checkout Page

How can I make my Drupal commerce checkout page - which now 1 long form - have 2 columns? I have read this, but its a bit above my head: ...
1
vote
1answer
21 views

How do I interact with $title, $breadcrumbs, and $action_links within a process or preprocess function?

I'm using a Bootstrap subtheme, with a custom page.tpl.php override. Within the template file, I see there are variables for $title, $breadcrumbs, and $action_links. If I wanted to access these ...
2
votes
1answer
20 views

Why is my field not showing up in the template?

I created a new field of the type Link for the Basic page content type and the field name is field_secondary_links. All the pages on the site operate based on custom templates and I edited ...