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
0
votes
1 answer

how to find property and element of a $form in drupal

I just started to work with Drupal modules. I have seen in some codes that some elements and properties (if I called them correctly, # for property) are assign to the $form. I have been googling but I couldn't find any useful document that shows…
Mohammad Yousefi
  • 563
  • 2
  • 7
  • 21
0
votes
1 answer

Using CSS #attached doesnt load stylesheet in

I am using Drupal's hook_form_alter to add a stylesheet into one of my forms (user registration form). My code does add the stylesheet to jquery.extend(Drupal.settings) as sites\/all\/themes\/mytheme\/css\/font-awesome-min.css:1, but this does not…
Jeremy
  • 327
  • 1
  • 7
  • 17
0
votes
1 answer

Drupal 7 Custom theme and custom module

I know drupal a bit. I am creating a custom theme and defined a region in my themename.info as regions[search] = Search Bar And added the below code to my page.tpl.php
0
votes
2 answers

Drupal 7 active menu style

i need a little help for this problem with Drupa7 theming. I need theming main menu with a class="active" ..my menu is on a block structure. If my menu is Forum, and the path is mysite/forum.. class="active" appear and work perfectly on my
user2679304
0
votes
1 answer

Drupal custom theme visibility to all users

I'm creating a custom drupal 7 theme menu_navigation_links('menu-headermenu'), 'attributes' => array('class'=> array('links', 'headermenu')) )); ?> Above is the code I'm using in my theme to show a menu I…
0
votes
1 answer

Marking one article as Featured to show on the Taxonomy Landing Page in Drupal 7

On my Taxonomy (Category) Landing Page, I am listing all the articles in the chronological format. But I also want to show one Article (that I select) or a latest one as a Featured Article on the Landing Page. With the Featured Article, I'd show the…
Steve
  • 2,546
  • 8
  • 49
  • 94
0
votes
1 answer

Drupal - dynamically add class to wrapping div based on panel pane content node type

Am using the drupal 7 panels everywhere module and i have set up a panel page template for my homepage. Problem is I need to add a class to a wrapping div in the template that is dependant on the node type inside the panel pane which is inside the…
rickf
  • 3
  • 2
0
votes
1 answer

Drupal Theme Modification

I'm trying to make a simple modification to the Bartik theme. I just want to disable the permalink in the user comments. I copied /themes/bartik/templates/comment.tpl.php to /sites/all/themes and modified /sites/all/themes/comment.tpl.php as…
Bill
  • 97
  • 1
  • 1
  • 6
0
votes
1 answer

Drupal themes don't work

I successfully installed drupal on my localhost. I can login and post things on the website, but whenever I try new template almost nothing changes. Whole page color is white and all links are blue. Themes show no effect. What am I doing wrong?…
jason
  • 6,962
  • 36
  • 117
  • 198
0
votes
1 answer

main_menu variable is always empty in drupal theme Zen

I am new to drupal theming and trying to edit the menu for a sub theme with base theme as Zen. But when I tried to add class and div to the main menu, I saw its not changing. Later when I print_r($main_menu) in page.tpl.php in my subtheme directory,…
Nitish
  • 2,695
  • 9
  • 53
  • 88
0
votes
1 answer

Drupal 7: Appropriate page template not loading

The path alias to the page is /annual-reports/2012. I have the following set up in the themes template.php file: function tcm_preprocess_page(&$variables, $hook) { $alias = drupal_get_path_alias($_GET['q']); $alias = explode('/', $alias); …
LoneWolfPR
  • 3,978
  • 12
  • 48
  • 84
0
votes
2 answers

How to force Drupal not to use import on CSS?

I want to use a script to reload my CSS, but the script uses tag and Drupal uses import for including CSS (when not using aggregation on a development site). I tried to use hook_alter_css but apparently (using dpm function) that's not the place…
Beto Aveiga
  • 3,466
  • 4
  • 27
  • 39
0
votes
1 answer

Editing drupal theme menu css

I am new to drupal theme development. I am using Fusion as my base theme and created a sub themed named coldfusion. My template.php is :
Nitish
  • 2,695
  • 9
  • 53
  • 88
0
votes
2 answers

Drupal Custom Templating Security Issues

I'm mainly a Wordpress guy and am trying to learn the ropes of Drupal 7. My question relates to templating best practices and security concerns. I am working with extremely complex designs (yeah designers right!?) so my markup needs to be clean and…
Brendan Moore
  • 193
  • 11
0
votes
2 answers

Is it better to use a separate template file for the front page?

In terms of: Speed Required processing (which will influence speed) Following standards Which of the following two methods will be better? I want to create a general page layout, however, the frontpage will look different from the normal look and…
rockstardev
  • 13,479
  • 39
  • 164
  • 296