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
9 views

Giving custom argument value in 'q' variable

We want to use a custom template page when a specific value is given for the q variable in url . For example if we give http://localhost/drupal/?q=xyz/123 , we want to use a custom template page ...
-1
votes
0answers
10 views

Passing variables from template.php to custom tpl of a form [duplicate]

How to pass custom variables from template to custom tpl of a form in drupal 7
0
votes
1answer
11 views

Creating a dynamic URL in node--resource.tpl.php

I'm trying to create a URL in my node--resource.tpl.php file that contains fields from the resource in question in the URL. The following code is what I've been playing with, but when the user clicks ...
0
votes
2answers
22 views

Customizing a Views HTML

I'll start off saying I'm pretty new to Drupal. I'm trying to customize the way a view displays. I want it to look like the Industry News section on this page: ...
0
votes
0answers
16 views

Programmatically get input format in field template

We change some output in our field.tpl-files for body fields, depending on the input format that was used on the node (which itself depends on the user being able to modify it). Now this worked by ...
0
votes
0answers
15 views

Node Template for MailChimp

I have a problem setting up MailChimp module properly: I have a ContentType called "Newsletter" - that template file is overwritten: node--newsletter.tpl.php -> within drupal it looks fine. Within ...
0
votes
2answers
18 views

display a view in admin theme

I have a custom view for editing contents for the authors. When I'm logged in as a use with this author role this view is displayed with the 'frontend' theme. But I need it displayed in 'backend' ...
0
votes
2answers
17 views

How to display 1 full article and the a summary of others

Hi I'm new to Drupal and I'm trying to find a way to display on my home page the full version of the latest article and a list of other articles as teasers. The teasers could be either listed under ...
-4
votes
1answer
25 views

why two login blocks are showing? [closed]

I am new to drupal. I am working on a website called blackfairy..I have my html template and I am trying to convert it to drupal theme..But when I type http://localhost/shop-around/user two login ...
0
votes
0answers
17 views

Working w/ Custom View Template

I'm cutting my teeth on custom view templates.. specifically: views-view-table--MYNEWVIEW.tpl.php I've copied the default template code into this file. When it's looping through the rows, building ...
0
votes
0answers
16 views

Block views cause page.tpl.php not to render

Weird problem -- not sure what is going on. I have a view, which is stored as a block, and that block is shown in the "Content" region of a custom theme which is itself a sub-theme. The sub-theme ...
0
votes
0answers
14 views

SagePay iFrame Theme Integration

I am using the SagePay Integration Module. I have created template file for the cart summary / overview (page--cart.tpl). I have also crated hooks to alter forms on the next two pages ...
0
votes
2answers
24 views

output a referencing field in node tpl

In a node type hotel I have an entity reference field to a node type offer. For the offer node.tpl I need to output some fields of the referencing node type hotel. I have no idea how to get these ...
0
votes
1answer
16 views

Views BEF checkbox count in drupal 7

I have created views with BEF check boxes as a filter criteria. I want to get count of each check boxes as mentioned in below image. Reference link. My view name is photo_search. So I have ...
0
votes
2answers
26 views

Best Practice of Extending Another's Theme?

I have a standard theme developed by others that I would like to add a custom view template to. Is it OK to just create a new "views-view-table--MYVIEWNAME.tpl.php" file in the theme directory ...
0
votes
0answers
16 views

Anonymous user can´t see views button which is added in template

I want to have back button in views page.. The button is added at the bottom of this code.. As Administrator I can see it normally.. But when I log out, it´s gone.. Any ideas ?
0
votes
0answers
31 views

Adding a Block Into Region

Using several different themes, I'm looking to add a generic region to the bottom of each "content" section of my webpage. The code I have so far is. . . . with Social Share being the name of the ...
1
vote
1answer
15 views

custom template for entity as referenced entity

I have a node type for which I have a custom tpl. OK. But this node type I also have as a referenced entity in another nodetype. And in this case I need another custom tpl. Is it possible to have ...
0
votes
1answer
22 views

Extend Theme to Different Content

I've installed a theme on my site, and can't figure for the life of me how to extend the theme to different content. For example, comments are themed on the blog pages; however, when I add new ...
0
votes
1answer
16 views

Image getting delete away by the cronjob later in drupal 7 using theme settings

i`m using system theme settings alter to add 4 images for theme, images are getting deleted /swept away by the cronjob later .trying using FILE_STATUS_PERMANENT images are not getting set as ...
0
votes
0answers
12 views

Open Atrium 2: Get back the old design

Is there a way to make Open Atrium 2 look a bit more like Open Atrium 1 (e.g. display icons for the sections)? We'd like to make it easier for our users to switch. Besides OA 1 looks friendlier in our ...
0
votes
3answers
36 views

How to locate page template in use?

I have a strange situation where my Drupal 7 Omega 4 site appears to not be using a page.tpl.php template. The page renders and content appears but when I alter all of my page templates to indicate ...
0
votes
0answers
20 views

How to send result to a theme form

Here is what I am looking for. I have a hook menu which calls a themed form to enter details. I have another hook menu which calls the records in a tabular form. Now what I want is to add a link to ...
0
votes
2answers
41 views

How to make submit button work in form themes

I am trying to create a form which calls an external template file to format the form but ended up into a typical issue. This is what I was doing. I created a hook menu and called a theme, in the ...
0
votes
2answers
63 views

Drupal 7 - create own login form

Is it possible to create own login form? I need to insert it into my basic page. It is campaign for my client and he wants to be able login from specific basic page. I have tried to use block from ...
0
votes
3answers
49 views

Drupal Node only with Title and Body?

Using Drupal I need to recreated node that only display title and body. Why ? I want to used my theme as e-mail template without re-creating a website manually. So I have to remove any menu, block, ...
0
votes
3answers
45 views

Show/Render Add to Cart Button

I have a commerce kickstart 2 site. I know how to create products and variations. I used the Omega Kick Start theme and have implemented my own template files for the entire site. Now I need to ...
0
votes
1answer
17 views

Landing page extension without 404 error

I have a problem concerning a landing page and 404 errors. Context : I have a content type "news", with auto url /news/my-news-title. I have created programmatically a kind of homepage for news, with ...
0
votes
2answers
32 views

Try to theme a specific page using template.php and a sub theme

I have a theme called 'progressive'. It has a sub theme called 'progressive_sub'. I'm trying to exclude items from being displayed from a particular page in D7 (latest as of 12.2.15). I have the ...
1
vote
1answer
36 views

Create block in template.php

I have the feeling that I'm doing something stupid or missing something obvious... I want to create a block in template.php in my custom template but it is not showing in admin/structure/block The ...
0
votes
1answer
34 views

How to preprocess view accordion

I'm using D7 and module Views Accordion (V 7.x-1.1) for my view. I've created my custom template (e.g views-view-accordion--[name of my view].tpl.php) for customize my view. However, when I want to ...
0
votes
1answer
19 views

page tpl pattern for a page with contextual parameter

I create a views with contextual filter and it's path is prodcuts/%, I know I can create a tpl for views but I need some more, I want to create a page tpl for this,( I want do another thing in that ...
0
votes
1answer
25 views

Field template not being rendered

On our company website we have a people page which amongst others has an image field called 'field_photo' This is being rendered using the following: <?php print render($content['field_photo']); ...
0
votes
4answers
108 views

Print Drupal 7 Field in node.tpl.php without labels or markup

In Drupal 7, you can render a field in a tlp.php file like this: But that prints it out with it's label and HTML. Is there a way to get just the raw value of the field. I know you can do the ...
0
votes
0answers
25 views

Unable to remove field wrappers on product page

I'm using drupal-commerce - the kickstart 2 -, semantic-fields and custom field template in my theme. I'm trying to implement this kind of display from semantic-UI. This is the formatter I created ...
0
votes
0answers
26 views

Custom block.tpl not affectiong all blocks

I have a custom theme and in the templates folder I have copied block.tpl and changed H2 to H3 and added a CSS class to the content div. Changes are taking affect and drupal is loading my block.tpl ...
0
votes
1answer
27 views

Remove `/node` from front page when using a template file (page--front.tpl.php)

As it stands I have no content going to the front page, i am simply using a template file for the front. When I sign out and sign in as any role of user on my site my front page url turns into: ...
1
vote
1answer
14 views

field.tpl.php available variables

According to the documentation, these are the available variables: $items: An array of field values. Use render() to output them. $label: The item label. $label_hidden: Whether the label display is ...
3
votes
1answer
54 views

How can I replace a node reference field with a node edit form?

I have two content types - parent and child. There is a one to many relationship (many children to one parent). I am migrating this content, and the current situation is that that node reference field ...
0
votes
0answers
14 views

Output menu using dpm() and zone template

I am using dpm($variables) to output the array elements for the zone menu. How do I use what is provided to output the zone menu in my template file?
1
vote
2answers
27 views

Removing potentially malicious code from template

Our drupal site was hacked at some point recently, and I've been tasked to clean it up because nobody knows much about drupal here. I think I've taken care of most of the glaring security holes, and ...
0
votes
1answer
25 views

print out multiple values of a taxonomy field

In a taxonomy I have some fields for the terms. To print out 1 of these fields in a node.tpl I found this code: <?php ...
0
votes
3answers
50 views

How to store css & js in separate file & call in custom 'tpl' files through variable in drupal 7?

I have created a custom module where I have define my page url's & contents are created through my custom tpl files. I am applying some css & js on those custom contents/pages/tpl files. ...
0
votes
1answer
28 views

How do I hide the page title based on node type using template_preprocess_page()?

In Drupal 7, this was possible. (See How to hide page title based on node type using template_preprocess_page().) function MYTHEME_preprocess_page(&$variables) { if (!empty($variables['node']) ...
1
vote
1answer
18 views

Tpl for page having url like product/checkout/%/%

I have created a page with hook menu with url product/checkout/%/% where % will be userid and product id. How can I add a page tpl for this url ?
0
votes
1answer
18 views

Is it possible to add a wildcard in template.php to apply function to multiple items

I have a webform with 20 different select options under different fieldsets and they all need to have a custom drop down select field title. To achieve that you use this: function ...
0
votes
0answers
15 views

How to display date in Calendar's week view?

I'm using the Calendar module. In the week display (not minicalendar), I would like to display the date ("January 21, 2015") in the heading in addition to the weekday ("Wednesday"), with the current ...
0
votes
2answers
33 views

Define variables for specific template

I would like to pass variables to a single specific template file(tpl.php). My setting is the following: my_entities.module function my_entities_theme($existing, $type, $theme, $path) { return ...
0
votes
0answers
23 views

How to get submitted form value inside hook_preprocess_hook() in Drupal 7?

I have a management module which consist of two theme pages[much like the core Search module], management-block-form.tpl.php: for showing the form and management-table.tpl.php: for showing the ...
0
votes
1answer
47 views

Add class to a views field depending on image's being vertical or horizontal

I have a view that outputs an image field. I would like to add a class to the .views-field div (for example, actually a views-row would also do the job) depending on whether the image is vertical ...