Questions tagged [drupal-theming]

In Drupal terminology, "theming" is rendering or modifying the HTML markup produced by a module or a theme.

Drupal theming system allows a theme to have nearly complete control over the appearance of the site, which includes both the markup and the CSS used to style the markup. For this system to work, modules, instead of writing HTML markup directly, need to return render arrays, which are structured hierarchical arrays that include the data to be rendered into HTML (or XML or another output format), and options that affect the markup. Render arrays are ultimately rendered into HTML or other output formats by recursive calls to drupal_render(), traversing the depth of the render array hierarchy. At each level, the theme system is invoked to do the actual rendering. See the documentation of drupal_render() and the Theme system and Render API topic for more information about render arrays and rendering.

Reference

822 questions
2
votes
3 answers

Drupal 7 theme "front" differs from other pages

I need a custom template for the 'frontpage' and a custom template for all the other pages. What are the best practices to accomplish this? Do I need to make 2 themes or can I use the same theme?
user1704548
  • 75
  • 1
  • 10
2
votes
1 answer

Starting a custom theme using Zen

I'm confused when trying to create a Zen subtheme for Drupal 7. First of all I'm sorry if this is a silly question butI'm not an expert on CSS. Basically I want to set a fixed height for the navigation menu shown on the following picture: (The one…
Pablo
  • 3,433
  • 7
  • 44
  • 62
2
votes
1 answer

Drupal sidebar Navigation links

I am styling a Drupal 7 website. I want to create sidebar menu as shown in image on drupal platform version 7. The menu has to be dynamic, so that if I add a new menu item I can do it easily and also able to add small image icon.
Milind More
  • 307
  • 1
  • 4
  • 15
2
votes
1 answer

How can I use multi-header based on the current page in Drupal 7

As title said, how to set one header region different on each pages with Drupal 7. For example: On the page n1 : Header n1 (picture set by DP in Theme configuration) On an other page : Header Different (idealy setted in a content type or in a tpl…
benftwc
  • 434
  • 6
  • 19
2
votes
1 answer

How should I access the vars which I set at theme_preprocess?

I am a beginner of drupal 7. I create a new theme and write a preprocess function at template.php: function mytheme_preprocess_page(&$vars){ $vars[my_var]=array('var_0', 'var_1', 'var2'); } How should I access $vars[my_var] at page.tpl.php?
solomon_wzs
  • 1,711
  • 5
  • 16
  • 29
2
votes
4 answers

Drupal 7: Add view to content type

I've been making a template for a particular content type, but just ran into a problem: I need to embed a view into the content type. I am aware this can be done via several different methods, but I don't see one that fits exactly my needs: I need…
Woodgnome
  • 2,281
  • 5
  • 28
  • 52
2
votes
1 answer

How do I add my own custom content to drupal 7 region?

If I want to change the content of the footer for $page['footer'] where do I change it? Im not talking about messing with the .info files. I dont know why its so hard to find! Edit: If I am at on a page.tpl.php file and I do "print…
Leon
  • 5,701
  • 3
  • 38
  • 38
2
votes
4 answers

Drupal error after creating new theme ,Undefined variable: hide_site_name and other similar error

I am new to drupal theme . I have created a direcory mytheme and added mytheme.info to it and copied other files from drupal's default theme directory . Now after editing the page.tpl.php, drupal is showing the errors below . Notice: Undefined…
Nitish
  • 2,695
  • 9
  • 53
  • 88
2
votes
2 answers

Drupal : Display time remaining instead of expired date

In drupal, I enabled Date module and added Date (Unix timestamp) to a content type, my question is instead of display the date how do I display the remaining time? Highly appreciate your help!
Peter
  • 1,481
  • 4
  • 19
  • 37
2
votes
1 answer

How to "print" a theme during AJAX request (Drupal)

When users click on a button (with id graph), I'd like to fill the default Drupal content div (
) with a graphael instance. The JavaScript: jQuery(document).ready(function($) { $('#toggle #graph').click(function() { …
Don
  • 863
  • 1
  • 8
  • 22
2
votes
1 answer

custom page-xxxx.tpl.php doesnt works

I have page named page--news.tpl.php, which i created for my news page. But after i cleared my cache, page still not using, and drupal use the original page.tpl.php. Any ideas how to solve it?
Avdept
  • 2,261
  • 2
  • 26
  • 48
2
votes
1 answer

Drupal Views outputting wronf date - Dec 31, 1969

Issue: Drupal Views module only displays Wed Dec 31, 1969 for date fields I have created a CCK content field type called field_gse_event_start_time. I also have several views displays that use this field - a calendar view, a table view, and a…
2
votes
2 answers

How to implement Responsive Theme on Drupal 6?

I need to implement a responsive theme on a Drupal 6 application. How can you do this? What are the available theme options? What is the best way to do it?
vermilion
  • 76
  • 2
  • 9
2
votes
2 answers

Drupal 7 - Appending class names to a menu block

I've been stuck on how to manipulate in the template file what a menu block outputs in it's html. The regular < ul class="menu" > with li links is fine and I don't need to completely gut this html that drupal creates for all menus but I want to…
cgv
  • 118
  • 1
  • 10
1
vote
1 answer

Drupal 7 - Add attributes to views anchors in theme/template file

Typically views appear to output anchors without 'title' attributes. How would you add 'title' attributes and any other attributes to anchors through either template suggestions or the theme template? There doesnt appear to be any good documentation…
Alex Gill
  • 2,395
  • 1
  • 16
  • 18