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
2 answers

Displaying a drupal page without the template around it in Drupal 7

I'd like to render the contents of a "basic page" in drupal. Something like this question: displaying a Drupal view without a page template around it but for Drupal 7. My attempt almost works: function mytheme_preprocess_page(&$variables, $hook) { …
Tamás Szelei
  • 23,169
  • 18
  • 105
  • 180
2
votes
2 answers

Customizing file link in Drupal7 template

I'm creating a custom layout (node--article.tpl.php) for a custom content type based on the Article type supplied in the base Drupal7 install. All I've added is a file attachment field for a PDF file. I want to have a link in the rendered page…
Dan Berlyoung
  • 1,639
  • 2
  • 17
  • 36
2
votes
1 answer

How to display one block among two block in Drupal?

I have two block (like Block1 and Block2) and I have to display one block among two. Condition is Block1 will be display into the whole site if Block2 is not present there. Block2 will be displayed into specific pages which is controlled…
Jilani J
  • 49
  • 5
2
votes
2 answers

Where to implement hook_search_info & _execute in order to force a language filter onto search results?

At the moment I am trying to force "current language" onto the list of the options passed into node_search_execute. Unfortunately I'm having trouble finding the right place to put the function hooks. Perhaps I am missing something simple. I've…
Alex C
  • 16,624
  • 18
  • 66
  • 98
2
votes
1 answer

Drupal 6 - Passing variable between functions specifically - Passing menu name to phptemplate_menu_item

I'm quite new to Drupal 6 and theming it. My theme required the main menu to pump out quite extensive html/css for my reasonably involved styling. To achieve this I pieced together this code 'function phptemplate_menu_item' (see bottom) which sits…
Paul Trotter
  • 607
  • 7
  • 14
2
votes
2 answers

Altering Title on Drupal Node Delete Confirmation Form

When you attempt to delete a node in Drupal, you're taken to a confirmation page whose title is... Are you sure you want to delete {title of node}? I'm attempting to alter the title of this page and have had no luck at all. I've tried the…
Eric Peterson
  • 25
  • 1
  • 4
2
votes
3 answers

Drupal Display Modified Date for Node

Is there a simple way in Drupal to display the last modified date for a node as part of the node.tpl.php file?
caseyamcl
  • 1,046
  • 1
  • 10
  • 18
2
votes
1 answer

drupal7 change format of comment's $created

I have been trying for some time now to reformat the date that appears below the avatar when a comment is made to a blog post. I have found no way of doing it through any settings, so I have moved over to the template files. Changing the date format…
2
votes
6 answers

Developing the front-end of a Drupal site - the basics

I've recently been given an existing Drupal project, and asked to improve the front-end (HTML, JavaScript, CSS). I have loads of front- and backend development experience in Django, PHP, Ruby, etc, but I don't have any prior Drupal experience, and…
Herman Schaaf
  • 46,821
  • 21
  • 100
  • 139
2
votes
1 answer

Drupal 7 specific layouts for pages

I am using drupal 7 and my theme is a sub-theme of Zen. What I am trying to do is on some specific pages /volunteers/bigbrothers the layout of this page needs to differ slightly than that of /volunteers. I am sure this is stupid simple and maybe…
dbslone
  • 2,014
  • 2
  • 19
  • 26
2
votes
2 answers

theme_status_messages() is not firing in my Drupal 6 theme

I have a template.php file with a theme called themename_status_messages It's not being called/invoked by my theme. When I use devel themer info on a test dsm output, I am told the candidate functions…
Justin
  • 2,914
  • 5
  • 41
  • 66
2
votes
1 answer

Drupal 7: calling "menu block" into page.tpl.php

I have the Menu block module installed; I created a second level menu as block via "add menu block" at the block page, and assigned it to the content area. It displays the menu block at the end of page content, but I need that just after the page…
2
votes
3 answers

drupal_set_message() not working in node.tpl.php template on Drupal 7

My problem is with in node.tpl.php In node.tpl.php, I have also done to find out if the theme template is set correctly. The answer is yes. I also have…
logii
  • 320
  • 1
  • 3
  • 15
2
votes
0 answers

How to turn a link into a button?

I have a Drupal 8 site with the Private Message module. I want to display a contact button instead of the contact link. I created a custom module, it works. But I prefer to put the code in the theme rather than creating a new module.
user12030855
2
votes
1 answer

Drupal - Ajax validation only works when I am connected

I am new in Drupal world and I'm trying to use the Drupal From API to create a contact form with Ajax validation. I'm facing 2 issues: My following form (see below) works well but only when the user is connected as administrator. When I am not…