For assistance with theme development.

STICKY: Theme development forum guidelines

The theme development forum was created to aid those who are developing themes for Drupal. This forum is not for issues you may be having with contrib themes. Issues with contrib themes should be placed in the issue queue of the theme in question. Please respect this.

If you you have drupal installed already and are seeking a theme, have a question about a specific theme and what it does or if it will fit your use case, please place your questions in the Post installation forum.

Conditional PHP in Node Template

Pardon my novice PHP, but I am looking to add conditional fields to a custom node template. I have a 'Preferred Name' field and a 'First Name' field set up, and I would like the 'Preferred Name' to replace the 'First Name' if applicable. My code:

Block view display override page view display

I have a content type "News" and I want to show it in 2 places with 2 distinct design.
Firstly, I want to show the latest News on the frontpage. To do so, I created a View Block named LATESTNEWS that only shows 1 element of this type. It works.

Secondly, I want a page that shows all the News. To do so, I created a View Page named NEWSPAGE. It works.

My problem is that the node suggestions of my view block LATESTNEWS override the node suggestions of my view page. Instead of showing

How to print Taxonomy Terms in Templates?

How can I display Node Taxonomy Terms in drupal 8 Templates.
We do this in Drupal 7 by add this code to node.tpl.php file:
print render($content['field_tags']);
I tried adding the below code in Drupal 8:
{{ content.field_tags }}
but with this code have problems:

Zurb Foundation theme


I'm trying to get the Zurb Foundation theme going and I've become very confused as to what the Foundation 4.x gem is doing/should be doing/will be doing!

Reduce blank space between Blocks


I am trying to reduce the vertical blank space in between my blocks on my right sidebar. Each block has excessive padding on the top and bottom. I've spent some time in the forums and think the answer would be in my sites/all/themes/icompany/style.css file but I'm not familiar enough with css to manipulate it.

I'd like to keep this as basic as possible -- no need to write new css right? I think I can just edit the border or padding #px? If so can you direct me to the general area where the code for my right sidebar is?

Thanks in advance!


Subscribe with RSS Subscribe to RSS - Theme development