This forum is for assistance with theme development.

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

Hi,
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

Hello.

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

Greetings,

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!

Change css / theme depending on menu item

I have thee main-sections on my page. Each section should has its own maincolor and styling.

How can I assign different themes or css-files (with different colors for h1, h2 ....) depending on the menu-item in Drupal 8?

For all content in menu 1 and below theme 1 should be used.
For all content in menu 2 theme 2

> menu 1 (theme 1)
> > menu 1a (theme 1)
> > menu 1b (theme 1)

> menu 2 (theme 2)
> > menu 2 (theme 2)

Pages

Subscribe with RSS Subscribe to RSS - Theme development