This forum is for assistance with theme development.

How to display data from fields in a node (d8)

Hi,

In d6 i have made some different layout for some nodes.
I can not find it how to do in d8.
What I have found out is that I can copy node.html.twg to node--adres.html.twg.
When i add someting to it, then this template is displayed when I display the adres-node.
But know i want to display some fields, such as field_email, field_adres and field_postcode.
Which code i must use?

Thanks,
Fred

Display content from multiple nodes from within one twig page template?

In Drupal 6, knowing a few specific node id's I was able to display the page content and titles from within one .tpl.php page. I think I used node_load() (it's been a while).

How can I do such a thing in Drupal 8?

I want to do something like this but I want to specify which node other than the current one and I want more than one.

Proper way to invoke jQuery UI menu widget

Hi all. I'm trying to theme a menu using the jQuery UI menu widget.

Here is what I've added in my template-preprocess.php inside the preprocess_page hook:

drupal_add_js('(function ($) { jQuery(document).ready(function () { jQuery( "#test-menu-id" ).menu(); }); }(jQuery));', 'inline');

I'm using jQuery Update to set my jQuery version, and according to the status report it is:

jQuery 1.8.3
jQuery UI 1.10.2

However, whenever I load the page to test I get the following error:

Using Jquery UI (Tabs) in Drupal 8

Hey there lovely community...
I'm new to Theming in Drupal 8 now... and it's of course quite different.
Right now I'm struggling over one simple task... I want to use Jquery Tabs in a node template...
So I build a node--project.html.twig and pasted my a simple HTML-Tabs structure there:

Hide title if Image field is not empty or has not default image

I have a Company Type nodes having a "company logo" image field.
That means that nodes diplays often a redundant Title and Image logo.
What can i do to hide title if image_field is not empty or more best if image_field has not default-image (if no image is uploaded) ?

Thanks to all

Best way to build a page with many blocks and HTML code in between [SOLVED]

I'm building a website that has many different structured sites with a mixture of blocks and HTML code in between.
Until now I have used the views module to generate blocks and just shown them on the wanted pages.
But ass I have many different pages with different layout and different blocks I find this hard to manage.

For example one of my pages would look like this:
http://www.electronic-festivals.com/uploads/block.jpg

Pages

Subscribe with RSS Subscribe to RSS - Theme development