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

Custom 404 - menu disappears

I have created a custom 404 page using hook_preprocess_page(): function THEME_preprocess_page(&$variables) { $header = drupal_get_http_header('status'); if($header == '404 Not Found') { ...
0
votes
0answers
17 views

User profile edit form cannot be submitted

I'm changing user profile edit page to reorder input fields and put them in div tags. I have added following code into template.php. function MYTHEME_theme() { $items['user_profile_form'] = array( ...
0
votes
0answers
12 views

How do I programatically generate multiple “add to cart” forms on product display?

I've got a matrix of 12 products, which can be added to the cart by users after selecting different term reference fields, which then select the appropriate product. This is shown on a product ...
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
1answer
14 views

Make header small on scroll down and large on scroll top [on hold]

I see some websites when i scroll down the size of their header becomes smaller. But when i scroll top its size revert to original. Is this the functionality of "CSS" or with help of "Jquery"? I want ...
0
votes
0answers
29 views

Link's href value gets lost

I am trying to make a link on node by returning this array(The array is being formed in the function by the name buildLinks() ): $links[$key] = array( 'title' => $definition['title'], ...
0
votes
1answer
20 views

Drupal 8 Theme a contact form

Hi i'd like to theme a contact form in Drupal 8. I'd like to put divs around form elements (using bootstrap). I also want to put some classes on certain elements (submit button, the form itself). ...
0
votes
1answer
23 views

Drupal Bootstrap THEME_menu_tree on new menu

Using Drupal 7 and the Bootstrap theme, in template.php I am successfully theming the primary menu (main menu) to enable extra list styles with function MYTHEME_menu_tree__primary($variables) { ...
0
votes
0answers
11 views

Full calendar view with bootstrap popover

I am trying to make a Full Calendar view show a bootstrap popover when clicked http://getbootstrap.com/javascript/#popovers I need to be able to add a data-toggle attribute to the event, but when I ...
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
2answers
32 views

how to add next and previous link on content full display page on tpl file in drupal 7?

I have a content type called flower and I have created a node--flower.tpl.php for displaying products. I am also using category of flowers. I need to add next and previous links on this page for a ...
1
vote
2answers
26 views

Using PHP to add %20 between words when printing out $title in tpl file

I have nodes of a particular content type that, when viewed, display a link for users that says 'trouble with this resource? let us know.'. This link is hard-coded right now into the ...
1
vote
1answer
24 views

Passing variable from preprocess block to the block body

There is a block which its body is produced by PHP Code. I need to set a variable before loading the block and use it in it. This is my code function THEME_preprocess_block(&$variables){ ...
1
vote
1answer
40 views

Using hook_form_alter on an existing form element in Drupal 7

I'm using the Commerce module and in the checkout process I'd like to change the size of one of the input fields. I'm trying to use the following code but it doesn't seem to be working. Am I doing ...
0
votes
1answer
21 views

“Article” html tag in body of Basic Page content type: what template is rendering this?

When creating a basic page, then previewing that page, here is a sample mark-up from the browser: <article typeof="foaf:Document" about="/?q=who-we-are" class="node-30 node node-page ...
1
vote
1answer
9 views

How to theme a custom object from an external datasource?

I am building a Drupal 7 website that has several Content Types (CTs) like Page, Event, Blog etc. For each CT, the full node view mode has been heavily customized using Display Suite. I am requested ...
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 ...
1
vote
3answers
69 views
+100

Where is comment admistration template located?

I have a Drupal 7 sub-theme based on Bootstrap 3 theme, the comment admin page (http://www.example.com/comment/46849/edit?destination=admin/content/comment/approval) looks as shown below. It is ...
0
votes
0answers
15 views

Sass error with zen 5, 'it is not clear which file to import

So, I'm getting what seems to be a common error in working with SASS in a windows environment. "Error: It's not clear which file to import @import'print';" using zen 5. I have tried changing the ...
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
2answers
10 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 ...
0
votes
1answer
19 views

show positive and negative votes

i'm trying to make a 'top voted' view of nodes and I want it to appear like this: title of node; 655 positive, 120 negative votes, total 775. how do i do the '655 positive, 120 negative votes' ...
1
vote
2answers
15 views

Print Main Menu inside a block

Very new to Drupal--trying to understand building a dynamic navigation menu for end users to handle. Is it possible to print the Main Menu inside a block I'm using for the header? e.g. <nav ...
1
vote
3answers
22 views

Default logo according to theme setting

I'm creating the theme with two styles, dark and light. User can choose which style he wants in theme settings. My default theme logo is in the root of the theme. Now I want to change default logo ...
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 -> ...
1
vote
0answers
8 views

Theming the controls of an Openlayer map

The Openlayers module comes with a default set of maps. It's possible to add layer templates, but it seems that the controls are always the same (see image). The controls exist of images that are ...
0
votes
1answer
20 views

modifying bartik [closed]

I'm in progress of designing a new theme based on the Bartik responsive theme. Now I would like to move my navigation all the way in the top left corner but I can't get it there, I don't find the ...
0
votes
0answers
9 views

Customizing the email in the Printer, email, and PDF Module

Regarding the Printer, email, and PDF Versions module (https://www.drupal.org/project/print). The 'send email' functionality has options to send the teaser or the full node...but I'm wondering if ...
0
votes
0answers
35 views

Adding a class to a region

I am working on my theme in Drupal 8 and I want to add a class to my header div. I tried adding this to the region.vars.php file. if ($region === 'header') { $variables[header]['class'][] = ...
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 ...
0
votes
1answer
15 views

How to theme checkout completion page in Drupal Commerce

I'm having a problem with theming the checkout completion page. My designer gave me a layout that will show all of the order details in that page(nearly same as the checkout review pane). I already ...
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
0answers
17 views

How to overwrite layout settings in Drupal Zen sub theme?

How to overwrite layout settings in Drupal Zen sub theme so that it can be changed by the sub theme itself? I found that in Zen core theme there is a comment as "Only toggle the layout for the main ...
0
votes
1answer
25 views

Create a theme function for form fields

I need to theme certain form fields on the user profile form page differently from other fields, for which I am trying to create a theme function that outputs html its own way, not using ...
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' => ...
1
vote
1answer
16 views

Remove js file by template or add condition in info file

I work on drupal 7, I added all js by info file, work well in whole site. But we want to remove or not load of a specific js in a specific content type page. I try by template.php of following code ...
1
vote
1answer
13 views

Drupal 7 how to programmatically display resent comment from all article with author image and comment content?

I'm just use built in function comment_get_recent($number); but its only fetch resent comment's subject and author name, is any built in function available which display resent comment with author ...
0
votes
1answer
13 views

Change route if mobile device

I am trying to change the template file called if mobile device is detected, ie. instead of a node I would like to display a View to the user. Instead of dipslaying 1 room (node) I would like to ...
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
0answers
23 views

Problem with function from theme-settings.php in sub-theme

I want to create the sub-theme of my custom theme but I have the problem with the function from theme-settings.php. I have a few managed_file fields in my theme settings and my submit function for ...
1
vote
2answers
30 views

Using hook_node_presave to auto-select a reference field from a field list selection

I'm trying to use hook_node_presave to select a value in a term reference field based on a selection a user makes in a field list field. The term reference field is hidden from the user. The code I'm ...
0
votes
1answer
14 views

ThemeKey: Use main theme for Node/edit and user/edit

By default, Drupal uses the "main theme" for the main site, and the "admin theme" for the admin pages. I want to use my "main theme" for the user/edit pages and node/edit & node/add pages of the ...
0
votes
0answers
11 views

How can I get content panes into the footer region?

I have some content panes, a menu and a webform that i want to appear in the footer region. I thought Page manager would be the tool to use, but that seems to put everything in the content area only. ...
0
votes
0answers
14 views

Subtheme Print css not working

I am cracking my head on something that should be very straightforward ;-) I have a project that uses a 'seven' subtheme, since it does not require a lot of styling. I want to print some stuff from ...
0
votes
2answers
30 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
2answers
20 views

Theme hook suggestion for nodes within a menu link?

I need nodes within a certain place in my menu to use a new node TPL file. My menu is hierarchical like this. link1 link2 link3 -linkA -linkB I need nodes whose menu link is link3, linkA or ...
0
votes
2answers
20 views

Views block showing empty content on front end

I created a view to show a list of news items. I placed the view block in the content bottom region of the page. In the Views preview, it shows the results. However in the front end, the content is ...
1
vote
1answer
21 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 ...