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
0answers
7 views

Can't make managed_file field to work

I added the file field for the image in theme settings and created variable in template.php file, but I can't make it work and I'm not able to upload the image file (after uploading the page refreshes ...
0
votes
2answers
17 views

unable to see drupal home page when configured live site into in my local system?

Hi all i need to configured my live site into local system ,i had configured database,settings.php and enable module rewrite and .htaccess file also there in my root folder etc. But i'm unable to ...
0
votes
0answers
5 views

No image style found

when nivo slides are added, I wanted to create custom image style size. But when click on image style, it says: "Error 404 - Not Found. The document you are looking for may have been removed or ...
0
votes
0answers
11 views

Why I get error when click on image style to create style for xlarge size

when trying to click on image styles to create custom style for image sizes, it says 404. On local host machine it worked fine but not on live server. Why ?
0
votes
1answer
20 views

Node.tpl.php file: Check is several fields are empty

On my node, I have three location fields (primary, secondary, code) and three object fields (food, fuel, accommodation). I want my node.tp.php to check if all the location fields are empty or if all ...
0
votes
1answer
26 views

Field Template Suggestions: Target a particular field type on a content type

I want to use a field template for all the fields on my "journal_page" content type that use a widget of "long text". How would I do this? N.B. My field is not named "long text". "Long text" is ...
0
votes
2answers
12 views

Change Drupal Views Rows before they were rendered

I want to change the output of a view. More precisely i want to reduce the resulting list to exact 3 matches: one specific row and its previous and next row. As far as I understand I need to generate ...
1
vote
1answer
30 views

How can I add a CSS class to a View Field programmatically?

Using template_preprocess_field doesn't work, I assume, because this is a field from a View, not a node. I've looked at this answer however that only seems to apply to the field value not the markup ...
0
votes
1answer
14 views

Add class in sub menu

I am trying to convert html to Drupal 7 theme. function theme_menu_tree($variables){ return '<ul class="my-class-1">' . $variables['tree'] . '</ul>'; } simply returns the entire menu ...
0
votes
1answer
8 views

Drupal Commons: Active sub theme of Commons Origins is intermittently not working (base theme is showing)

I have a staging site and a production site. The production site does not currently have a DNS record and I currently have a hosts entry for it (134.x.x.x subdomain.example.com). I have a subtheme ...
1
vote
1answer
32 views

Are there Drupal 8 custom block type naming conventions?

With our ability to create custom block types and manually add additional fields in Drupal 8, is there a simple naming convention to create block--custom_block_type.html.twig to handle the layout of ...
1
vote
2answers
26 views

Features can export everything?

Built all blocks, menu, taxonomies, view etc in Drupal CMS on localhost machine, but I need to export everything to the live server. Is it possible to use features or just export sql?
0
votes
2answers
26 views

Styling first results from a View differently from the rest

We have a page that needs to render an unspecified number of nodes, newest one first. The first result needs to be displayed as a very large "hero unit", the next 4 results as a group of four large ...
0
votes
2answers
13 views

Custom template file for custom view mode on site front page

I'm trying to style a view a certain way on the front page (using a custom front page, page--front.tpl.php) of my site, and here are the steps I've taken using Entity View Types and Views modules: ...
0
votes
1answer
11 views

Add body class to both Node add and Node Edit Page

I want to add a Body class to my Node Add pages and my Node Edit Pages. How can I do this? I know that I need use the following in template.php to add a class to Node Edit: function ...
0
votes
0answers
5 views

How to use JqueryMulti?

I have a site theme that needs to use Jquery 2.1.3. The theme uses on() and affects the node/add form, so I also need Drupal's default Jquery 1.4 to be running, otherwise the default Drupal scripts on ...
0
votes
2answers
26 views

How do I display taxonomy content from taxonomy category?

I have fields in taxonomy under category taxonomy. Attempted views but couldn't find taxonomy fields to add as fields :( Do not want node fields. What I did is: 1. Create taxonomy, category 2. Add ...
0
votes
0answers
8 views

Iterating through variables: Preprocess and process functions and template files

I have a search results template file that prints out search results. If I'd like to iterate through a variable (that I create - let's call it $category) and print out something different with each ...
0
votes
0answers
12 views

How to insert tabs in the node body

Tried JQuery Tab menu module but it is not working for Drupal version 7.35. It gave me bunch of errors related to SQL. Gave up after trying to fix the error. Wonder if there is any good module or ...
0
votes
2answers
38 views

How auto load items on page

Taxonomy page will have sidebar which will have taxonomy menu items and grid layout with image and brief details. For example, taxonomy items have brand by certain names, price range, etc. User ...
0
votes
1answer
24 views

What does -> mean in the context of Drupal [closed]

I see a lot of variable declarations that go something like this: $variables['classes_array'][] = drupal_html_class('node-', $node->type); What does '->' mean in $node->type and why can't we just ...
0
votes
1answer
26 views

How to add sidebar to taxonomy page or node page?

Thought a bit more how people use Drupal CMS to update categories. Categories will be taxonomies in a view so that they can refer nodes to the categories. Also at the most when click on category, it ...
0
votes
2answers
38 views

theme individual block

I looked over the theme suggestion but when tried with dummy text, the block doesn't show any dummy text. on view source, it showed "id=block-menu-menu-top-menu-navigation" Tried naming ...
1
vote
3answers
29 views

Can “No front page content has been created yet. Add new content” be removed totally?

I noticed that if there is content placed in the main content block, "No front page content has been created yet. Add new content" will appear on front page or perhaps any page. Most templates will be ...
1
vote
1answer
14 views

Views: Display filters as a HTML UL list of links with clean mark up

I have a View that has a filter which allows users to select nodes that contain specific taxonomy terms. I would like to display this as a HTML list of links (<ul>). How can I do this? ...
0
votes
0answers
18 views

How do I add sidebar with menu, using Display Suite?

Display Suite layout just shows the full content for node, but I also need to place sidebar on node page. I realized that I can't place main menu which I already created via menu settings in the ...
0
votes
0answers
9 views

How can I swap main navigation when click on link

Link 1 | Link 2 If click on link 1, main menu will show "examples, contact us, products" on the navigation bar. If click on link 2, main menu will change to "Learn more about our mission, etc" ...
0
votes
0answers
13 views

Drupal 7 Views: Assign templates to specific views (possible via template.php)

In Drupal 7, Views have multiple view-displays (e.g. block, Page etc). If you click Theme, it will give you specific names to use to template for these view displays. However, this isn't very ...
0
votes
2answers
16 views

Printing fields in theme: Undefined index: safe_value

I want to print my fields in tpl.php files as cleanly as possible. To do this, I have used the following code in my template.php file: function print_field($field_name, $format = 'safe_value') { if ...
0
votes
1answer
14 views

Get nid inside preprocess function

My goal is to have an additional region class, when region is rendered on my page--node--9 I am using this template_preprocess_region() function to do this. But how i can get inside my function ID ...
0
votes
1answer
22 views

How do I add a custom class to a field based on another field value(boolean)?

I have a Commerce product and there are two price fields. (Original price and Sale price). I would like to display original price as line-through text when sale price is available. Therefore I would ...
0
votes
1answer
16 views

Exclude Views field from displaying and just print it in field template?

I have a field (title) in my View that I want to print in another views field template, using: print ($fields["title"]->content); However, when I use the above code, the field now prints twice. ...
0
votes
1answer
14 views

Image Repo and Uploader for specific role

we'd like our staff to be able to add images to a content type whenever they add a new node to this specific content type. This is easily enough done with the image field. However, this requires a) ...
0
votes
2answers
30 views

How to arrange two blocks horizontally?

I am going to create this, But I really don't know how to do it. and I want to create one view with two blocks. what Format of view should be? (HTML list, Grid, Table, ...) I don't know theming, ...
0
votes
1answer
15 views

How do I separate multiple values for “print render($content['field']);” with a comma?

So in my node template, I am using the following code: print render($content['field_taxonomy']); Sometimes there is only one result printed, and sometimes there are multiple results printed. How ...
0
votes
0answers
18 views

Unable to override subtheme for any base theme

"Overriding inherited .tpl.php templates: Add a template file with the same name in your sub-theme folder to have it override the template from the parent theme." on drupal.org Made subthemes with ...
0
votes
1answer
31 views

Adding an image to the home page

I'm using the Zen sub-theme. I don't want all the new stuff on the site showing on the home page so I'm editing page--front.tpl.php. Removed print render($page['content']). But now I want to add some ...
0
votes
1answer
30 views

How to parse PHP variables in drupal_add_js in template.php

I'm using drupal_add_js for some inline jQuery - I need to parse some php variables in the inline jQuery, what is the correct way to do it? drupal_add_js('jQuery(document).ready(function () { ...
0
votes
1answer
22 views

Add radio buttons and text field together to theme-settings.php

I want to integrate a CSS switcher into my theme, but without the Color module. So I want a radio button list, (or a select list, or dropdown, doesn't really matter), with a list of different styles, ...
2
votes
1answer
37 views

Outputting different class other than default for status messages

I'm trying to theme status messages, I want to change the HTML of the message. Drupal default is <div class="message status">message!</div> What I want to achieve is <div ...
0
votes
0answers
16 views

Theme a form element in drupal with template file?

I wanted to ask you if its possible to do following things: My form consists of three elements. 2 Dropdowns and one custom element. The second dropdown values are getting rendered when I choose a ...
0
votes
1answer
15 views

Error in Views override template “Notice: Undefined offset: 1 in include()”

So I am theming a View with a template in my theme folder. I am getting this error message: "Notice: Undefined offset: 1 in include()" This is the code: <?php print ...
2
votes
2answers
101 views

Using orderBy correctly with hook_query_alter

I have a hook_query_alter function that I'm using to edit my search.module results. It works ok so far. However, I'm having trouble adding an orderBy condition that I need. Here's the SQL I want added ...
0
votes
2answers
39 views

Passing variables via template.php for search module

I'm using search.module. I used dpm(get_defined_vars() ); in my search-results.tpl.php file to see all returned variables, so I can reference a needed variable in some PHP code I'm writing in there. ...
2
votes
1answer
21 views

Field prints twice, or not at all when added to template file

I have set my node field to 'Hidden' in the Manage Display page, and am printing the field in the corresponding tpl.php file, but the field only prints if I set the field format to 'Default' in Manage ...
0
votes
0answers
26 views

Insert the node slides in template

Have not touched Drupal for 3 years already and try to remember how to do the templates. Banner node -- I checked the field name: field_data_field_banner and wanted to print every node banner image ...
0
votes
1answer
39 views

Drupal 7 pager from module fuction not displaying in page.tpl

I have a function mymodule_submissions in my module which fetches rows from mymodule_table and prints as table theme with pager. Its working fine if I define a menu link in my module to call that ...
0
votes
2answers
27 views

Use Views field output as a class? Tokens?

I have a field in my view which displays the taxonomy vocabulary that each result/node is linked to. However, I need a way to get that taxonomy vocabulary result and use it as a class for the view row ...
0
votes
1answer
41 views

Adding an HTML data attribute to rows in Views

I've tried rewriting the row and also theming the Views row, but I'm not having any luck. Maybe I'm doing something wrong. I have the format of my view as 'Unformatted View', and in the format ...
0
votes
1answer
9 views

Contrib Module JavaScript interfering with Node

If one has a contrib module that works fine in most cases, but on a specific page (say /comment/comment) you wish it NOT to appear, but the options in Config don't give you that ability...what's the ...