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

0
votes
2answers
15 views

Drupal 7 — Would like to use unique profile template per role

I'm working on a Drupal project where we have two main roles (students/teachers) + an admin role. I would like to have entirely different profile pages for the different roles. At the moment I think ...
0
votes
1answer
11 views

File_load for image path errors when empty

I need to print the URL of an image in a content type TPL file. I can do this with the following code: <?php $file = file_load($node->FIELD_NAME['und'][0]['fid']); ?> <?php print ...
1
vote
0answers
14 views

Normal View creates form with hidden inputs?

Ive created a view which im rendering in a content type TPL file with this: <?php print views_embed_view('shows_taxonomy_term_links', "block_1"); ?> Im getting some really weird behaviour. ...
0
votes
0answers
18 views

Floating .field-item image to left of content type rather than centering it [on hold]

I'm relatively new to Drupal and so-so with CSS and am trying to float the image on a particular content type to the left of the content rather than having it center on the page on a row by itself. ...
1
vote
2answers
13 views

using sass to generate RTL & LTR css files in Omega 4

is there any convenient way of using Omega 4 to compile rtl and ltr css files automatically. I mean something like this or this, but for drupal.
0
votes
0answers
28 views

How to position javascript file as the last one to load?

In Drupal 8 the weight for javascript files in libraries is not supported, or at least only negative values are allowed, which means I am only able to position them at the top of the list (i.e. load ...
-1
votes
1answer
25 views

How PHPTemplate works and what it do? [on hold]

There is a default templating system PHPTemplate in Drupal, they say. But where can I see it? I don't see anything more than pure php in template files .tpl.php. Once I've seen template system ...
2
votes
0answers
13 views

Drupal log visualization

so I installed better statistics https://www.drupal.org/project/better_statistics and Syslog Access so now I am wondering is there a module that can take this data and visualize it like a graph, pie ...
2
votes
1answer
54 views

How do I use '#attached' to attach a style sheet?

I know that drupal_add_css is depreciated, and that we should use #attached instead to attach a css style sheet to a module. I am trying to replace the following (which works): ...
1
vote
0answers
14 views

Pass variable to field template from theme_preprocess_field()

I'm stuck trying to pass variables from my theme_preprocess_field function to my template file. I want to have a variable for each of the fields I am printing out to my template. I'm using the ...
0
votes
1answer
30 views

Using jquery-match-height to set two blocks to equal height

I'm new to jquery and adding it to Drupal. I'm trying however to add this library to my Drupal site so I can set two of the blocks on my home page to equal heights. But it's not working and I'm not ...
1
vote
0answers
22 views

How to fix views ajax problem when accessing via a proxy? (Browser Sync)

I am using a new theme called Neato which uses node.js to run gulp and Browser Sync. For dynamic sites, Browser Sync has to run in proxy mode and the live preview is then displayed at ...
0
votes
0answers
7 views

Load a single node on a taxonomy term page

I want to override the content output of term pages within a specific vocabulary. I need to show a specific node that is tagged with the term instead of all of the nodes. There will only ever be one ...
0
votes
2answers
39 views

Printing fields in a View template file (Devel / Krumo)

My "Article" node type has a field image. I can print this field in a node template with <?php print render ($content['field_image']); ?> I have a simple View which lists Articles here. The ...
1
vote
1answer
16 views

Best Practices? Create dynamic links with static titles on node full view page

As with anything drupal, there are a million different ways to do something. I am asking this question for 1) Because I actually have to do something similar and 2) Because I would like to know all ...
0
votes
1answer
24 views

Create Drupal 7 page specific tpl files without using node ID's

i know you can crate custom tpl files for a specific page by doing the following: html--node-999.tpl.php But this doesnt work well if the node-id is going to change when switching environments or ...
2
votes
1answer
8 views

Printing raw field value to use in path to files

I have field called "field_cat_id" which has a numerical value (10201; 10202 etc). The field represents a category id and it is also used to arrange PDF files, I would like to print this (raw) value ...
0
votes
0answers
10 views

Best way to develop a drupal mobile app?

I'm looking to create a mobile app with a series of buttons in drupal. I looked at the mobile jquery theme so far. Will this be possible with that? Or is there a better route to go? Or should I make ...
1
vote
0answers
11 views

Taxonomy fields on Profile2 edit form

I'm hoping someone can help me. I've been stuck on this problem for a while and can't find help. I'm relatively new to theming in drupal, so forgive me if this is a basic question. I have a taxonomy ...
1
vote
0answers
15 views

What's the best way to create variables that are available to every single URL on my site, based on node id or taxonomy id?

On Drupal site A we have a bunch of links to non-Drupal site B. For marketing and tracking purposes all these links have a different URL variable appended to them, so that when a user registers on ...
0
votes
2answers
42 views

SHS module in drupal 7 views

I am using Simple hierarchical select module and I am having terms lists like below; India a) Karnataka Bangalore So, I want this filed as exposed filter in my views. Let me give example, ...
0
votes
1answer
17 views

How do I check if a block region is empty?

I'm wanting to apply some specific CSS on the condition that a block region is empty. How do I make this check?
0
votes
1answer
17 views

Drupal 7 theme table row array will not show

I have the below code and I know both the $headers and the $html have values stored in them as i can echo them out. I can also set the 'header' => in the theme function to be either $header or $html ...
1
vote
1answer
12 views

How to set all values of a field as body classes

I want users to easily modify the layout of a node by selecting options in a 'Layout' field that the node contains. The field is a entityreference field referencing taxonomy terms. (For example, the ...
-1
votes
1answer
19 views

css file defined in .info file is not loading in Drupal 7

This is the my .info file details name = Tripsinn description = A flexible, recolorable theme with many regions. package = Core version = VERSION core = 7.x stylesheets[all][] = ...
0
votes
0answers
15 views

Background image doesn't reach the bottom of page on Long pages in Zen

I am noticing - on some very long pages the page background image doesn't reach the bottom of page, leaving all white background down below the page.... It happens on a very long article -pages , may ...
1
vote
0answers
25 views

Default theme css wrongly included in another theme

I have 2 themes enabled on a Drupal 7 installation. The have one css file each included in their .info files: sites/all/themes/themeA/css/screen.css sites/all/themes/themeB/css/screen.css The ...
1
vote
1answer
42 views

Anyone know how to build a menu like this? [closed]

We are redesigning a site for a client and they're wanting to create a menu similar to the one found here (the big menu below the header, not the hamburger menu at the top left): ...
1
vote
3answers
54 views

How to theme output from module? [on hold]

I have a simple module that is extracting names from database table. I can display that names in hook_block_view like this: function example_block_view($delta = '') { // $result - an array ...
0
votes
1answer
16 views

How to display the same nodes with two different themes?

I have some content types normally displayed with the default theme of my site. Now, I want to show such content types also in another section that is displayed with another theme and layout. What ...
1
vote
1answer
36 views

Drupal 7 field collection tpl no output on render

I'm using Drupal 7 with field collection module. I have my tpls setup and being triggered using the render function; however, even though the tpls are being executed, the output is being thrown away. ...
0
votes
1answer
35 views

Any way to set Drupal theme settings per page?

I have a theme which has multiple theme options in its settings page. Is there a way to assign particular theme settings to specific Drupal paths?
1
vote
1answer
58 views

Adding a “three line” character (☰) or image to TB Mega Menu dropdown button

I'm currently developing a website with TB Mega Menu using a Zen subtheme. The problem is that the default TB Mega Menu button (the one that replaces the 'normal' horizontal menu on smaller screens) ...
1
vote
1answer
26 views

Theme a specific view with Twig

Is it possible to write a twig template for a specific view? I have a view with multiple blocks and I want all these blocks to look the same. But I am having trouble with my views actually knowing ...
0
votes
2answers
16 views

Using a template for a custom admin page made with hook_menu

I have developed a module in Drupal 7. Now, I want to add a custom themed-page in the admin panel of Drupal. I have added a page using admin_menu(): function newsletter_menu() { $info = ...
0
votes
1answer
35 views

How do I get clean output with indented structure

How can I create a clean theming markup so that the output uses the same indented structure as in my static html template? E.g. when I insert $head; Drupal uses it’s indenting format. How can I ...
0
votes
0answers
23 views

Part of foreach in tpl.php of the View acts strange

I created foreach in tpl.php of the View and it looks like this: <div class="carousel-inner"> <?php foreach($view->result as $result): ?> <div class="item active"> ...
1
vote
0answers
11 views

How to change the default comma in drupal to the rtl comma?

I wonder where to find the drupal default comma type and how can i change it to the rtl one type for rtl website reasons. Thanks
0
votes
1answer
18 views

How to theme main menu in three columns

I have a main menu block which i am showing at top-navigation. I need to theme main menu but not sure how to apply classes to the root level menu items and sub menus. i tried below snippet but not ...
0
votes
1answer
18 views

Why is my custom block template applying to all blocks?

I have a region on my home page called home_area_1. It contains several blocks. I want those blocks to be formatted in the same way, so I created a template called block--home-area-1.tpl.php. It is ...
0
votes
1answer
16 views

How to give class name to the text field in drupal

I am new to drupal and I have a problem in drupal text-box. Question : how to give a class for text box? my html : <input type="text" name="uname" class="uclass" id="uid"> i want the same ...
0
votes
2answers
33 views

How do I override a module template (.tpl.php) from my custom subtheme?

I've seen how to override module templates from other modules and theme templates from subthemes, but how do I override module from subtheme? The file is under the profiles folder. Edit: I'm using ...
0
votes
2answers
22 views

Views/Block: Only display if node field has a value

I've created a Block in Views. I only want this Block to display if a boolean field on the node is ticked. The View itself should only display content that relates to the node. How can I do this? ...
0
votes
1answer
32 views

How to display elements responsively side by side using Bartik theme, similar to bootstrap grid?

I am developing a module for Drupal 8, currently using the default Bartik theme. My module defines some pages through twig templates. As I am displaying several sections of a dashboard, I would like ...
0
votes
1answer
25 views

Wrap teasers in a div (simple taxonomy page, no views)

I would like to know if there is a way to wrap the nodes teaser in a without using jQuery. Basically, this is how the DOM is : <div id="block-system-main" class="block block-system"> <!-- ...
0
votes
1answer
29 views

Correct way to render fields from Entities?

This very popular article explains correct way to render fields: http://www.computerminds.co.uk/articles/rendering-drupal-7-fields-right-way According to the article, the correct way to render fields ...
1
vote
1answer
38 views

What is the best approach to write hooks?

I had to use some hook functions on almost every project I worked, right now I am working on a project ( basically to collect donations and maintain organizations list ) where I need to write lots of ...
0
votes
0answers
10 views

“Email from Name” attribute in Newsletter

I want set "email from name" to name attribute so that it will display name of the user in the email inbox.
0
votes
0answers
8 views

working on a website with Book Module in Drupal 7 bartik theme

I have a few questions: Using Drupal 7 , bartik theme Book module I want each user to see the previous weight field when he wants to add a new page in a book so that they can put the weight by ...
0
votes
1answer
8 views

passing html output to response object in drupal 8

I had this: http://pastebin.com/C4Tz2fUv piece of code in a module developed for some previous version of D8 but now in present beta release it shows this problem: http://pastebin.com/C07Y0BDJ because ...