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

Drupal 7 change Submitted by format

I'm new to drupal but learning quickly. I've got drupal 7 and I'm working on creating a theme based on Zen's starterkit sub-theme. I'm trying to find where I can customize the "Submitted by" line. The default looks like this: Submitted by kenny on…
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229
5
votes
1 answer

How to add breadcrumb?

How can I add breadcrumb to a page in my attendance module. I have used the following hook, but it changed the breadcrumb for all pages in other modules also. function attendance_init() { // set the breadcrumb $breadcrumb = array(); $breadcrumb[] =…
Umar Adil
  • 5,128
  • 6
  • 29
  • 47
4
votes
4 answers

How to theme Ubercart Checkout Complete page

I want to theme the page /cart/checkout/complete I already saw the settings in admin/store/settings/checkout/settings, but they are not enough. I want to add some HTML i.e. add a print button at the top of the page. I would like to have a .tpl.php…
user1014351
  • 437
  • 1
  • 5
  • 16
4
votes
3 answers

theming "field collection" in node pages drupal 7

Drupal 7 "field collection" - If I want to theme a node page which has a "field collection", how do I go about separating the fields for customization? It seems thus far that only print render($content['field_collection_name']); outputs the result.…
jhanjon
  • 61
  • 1
  • 1
  • 8
4
votes
3 answers

Images not showing up on drupal test site

I have successfully installed CKeditor and am attempting to link some images. After many errors I got the path right but once saved the page still ends up blank and when going back to administer the basic page the image is no longer there nor a…
EZDC
  • 682
  • 1
  • 17
  • 33
4
votes
1 answer

Use of pattern for template suggestion doesn't work in hook_theme()

I'm trying to implement pattern and template suggestion but It doesn't work. Here is the implementation of hook_theme() with my pattern: $theme['nm_home_page_zone'] = array( 'pattern' => 'nm_home_page_zone__', 'arguments' =>…
Plumillon Forge
  • 1,659
  • 1
  • 16
  • 31
4
votes
6 answers

Drupal views - splitting up the exposed form possible?

I need to display part of the exposed form in my page's sidebar, and the rest of the form and content in the $content area. There's really no good way that I can find to do this. I sort of got it to show up in a way by making a "block" view with…
Matthew
  • 15,282
  • 27
  • 88
  • 123
4
votes
4 answers

Drupal - Disable listing of nodes on taxonomy term page?

Is it possible to disable the normal taxonomy listing of nodes on taxonomy term pages? The reason I need this is I want to use a view's override of taxonomy pages BUT the default views override stops a breadcrumb module working properly. So, I want…
Evanss
  • 23,390
  • 94
  • 282
  • 505
4
votes
5 answers

How to show logout button if user is logged in Drupal?

I need to show a logout button on my site if a user is logged in and a login button if a user is not logged in. How can I do that?
Tausif Khan
  • 2,228
  • 9
  • 40
  • 51
4
votes
3 answers

Drupal mobile site themes

I'm developing mobile part of website and I need recommendation for a module and themes. As far as modules concerned - Which one do you use - http://drupal.org/project/mobile_tools or http://drupal.org/project/mobileplugin? I'd also like you to…
Jezdimir Lončar
  • 433
  • 4
  • 14
4
votes
1 answer

Drupal run update.php shown in Zip archive support missing

Anyone suggestion to me. I have update drupal modules in live version, shown this error. How to fix this...
tamilselvancst
  • 478
  • 1
  • 3
  • 19
4
votes
6 answers

Drupal8 Twig - convert string to integer

I just started using twig in drupal8. I'm trying to calculate the difference between two numerical drupal8 variables using views. field_goals_for: 24 field_goals_against: 3 field_goals_difference: should return 21 but returns 1 I tried already…
ciaobetty
  • 93
  • 1
  • 1
  • 6
4
votes
3 answers

Core search module, change markup

I want to remove the Search results string added in the search page from line 119 of core/modules/search/src/Controller\SearchController.php. if (count($results)) { $build['search_results_title'] = array( '#markup' => '

' . $this->t('Search…

Patrick
  • 104
  • 1
  • 12
4
votes
1 answer

How to put the pager on top and bottom of a page?

I know that I need to use theme_pager function to render the code: http://api.drupal.org/api/function/theme_pager/6 I know that it is pre rendered into the $content of the page.tpl.php and if I would like to theme it I only had to overwrite the…
FR6
  • 3,157
  • 3
  • 24
  • 28
4
votes
3 answers

Drupal 6: print all body field content to node template file

I tried to display body content with: content['body']['#value']; ?> However, it doesn't display all body content, it just display first paragraph of body content, sometimes 2 paragraph if it is short :/ I need to print all body.…
designer-trying-coding
  • 5,994
  • 17
  • 70
  • 99
1 2
3
54 55