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

Drupal 6 - Custom Node Type Template in Module

I have a module which adds a new content type. For this content type I want to supply a node_contenttype.tpl.php node type template, but Drupal will not recognize this template in the module directory, only in a theme. How do I get Drupal (6) to use…
theduke
  • 3,027
  • 4
  • 29
  • 28
7
votes
3 answers

Can I modify theme_menu_link for a specific menu?

I would like to add pipes ("|") between menu items for one of the menus on my Drupal 7 site (theme name is "thompson"). I figured the best way to do this is to create a function in my template.php file called thompson_menu_link. I did that and it is…
Brett F
  • 414
  • 6
  • 11
7
votes
3 answers

Why aren't my drupal 7 submenu's showing?

I can't seem to get my sub-menus to display. I've gone to: Home » Administration » Structure » Menus Then, I've edited the parent menu and checked the tickbox that says "Show as expanded" - but still nothing. The code on my page.tpl.php page for the…
Nick
  • 715
  • 2
  • 7
  • 10
7
votes
3 answers

How to theme a view in drupal

Can any one help me out on how to theme a view. For each view created i want to have different templates.
sangeetha
  • 203
  • 2
  • 5
  • 9
7
votes
2 answers

How to add Google Analytics code to Drupal 7

I want to add my Google Analytics code to my Drupal site without using the module. I read threads related to this but I can't make it on my website. I want to put my code inside the tag. Here's my code:
kagat-kagat
  • 1,455
  • 4
  • 22
  • 27
7
votes
2 answers

How to create themes in yii framework?

I am new to Yii framework. I was working on drupal earlier, and the theming of drupal made sites are not difficult to manage. But I just want to know that how to create theme for the site with Yii framework. I have gone through many sites, but…
Workonphp
  • 1,635
  • 1
  • 19
  • 21
6
votes
1 answer

Enable blocks automatically when a theme/module is installed

I developed a Drupal theme and a few modules. The theme defines special regions where the blocks from my modules can be displayed. In the present condition, first I have to install/activate the modules, then install/enable the theme and then…
Sparky
  • 4,769
  • 8
  • 37
  • 52
6
votes
2 answers

Stretching tag to fill parent
  • in horizontal list
  • Here's my (abstracted) css and HTML: #primary-menu{ text-align: center; margin: 20px 0; } #primary-menu li{ list-style-type:none; display: inline; margin: 8px; padding: 5px 30px; } #primary-menu ul{ padding: 20px 0px; }
    user1481521
    • 75
    • 2
    • 6
    6
    votes
    5 answers

    Drupal Themes getting "unselected"

    Sometimes, at least 1 time a month +-, when I visit my site, there is no theme selected and I get a lot of error code. Notice: Undefined index: highlighted em include() (linha 120 de…
    Mete
    • 293
    • 1
    • 4
    • 16
    5
    votes
    1 answer

    Drupal: How to wrap inline images into additional markup

    i need to wrap images into additional markup for further css styling. I would like to have something like that:

    alt

    . The images are added directly on the specific node using following…
    gearsdigital
    • 13,915
    • 6
    • 44
    • 73
    5
    votes
    3 answers

    How can I change the way my Drupal theme displays the front page

    I am trying to build an website for my college's magazine. I used the "views" module to show a block of static content I created on the front page. My question is: how can I edit the theme's css so it changes the way that block of static content is…
    Flávio Amieiro
    • 41,644
    • 8
    • 32
    • 24
    5
    votes
    4 answers

    Custom theme doesn't load theme css file in Drupal 8

    I'm making a new theme but have problems loading the css. Though I think it is correct to the documentation of Drupal it doesn't work. I created a folder in /themes/custom/noadin and added the info and libraries files noadin.info.yml : name:…
    bond708
    • 153
    • 1
    • 6
    5
    votes
    7 answers

    Can't get the search box to show up in custom theme

    I'm trying to make a custom theme for a drupal blog, and I want the search box to appear in the header. To do that, I've put the following code in the page.tpl.php template file :*
    5
    votes
    1 answer

    Theming Drupal 7's Ubercart "/cart" page

    I'm trying to theme Drupal 7's Ubercart 3 /cart page, but I'm struggling to find the theming function to do so. I believe the right code may be located in template.tpl.php, but I am not sure. Where in Drupal is the code to theme this page?
    PapaSmurf
    • 1,035
    • 2
    • 14
    • 26
    5
    votes
    1 answer

    Converting HTML template to Drupal 7

    I have a HTML theme. How to convert our HTML templates to Drupal 7 theme?
    sjkon
    • 633
    • 2
    • 10
    • 24
    1
    2
    3
    54 55