How to get and set the block's weight in Drupal 8

I'm trying to use template_preprocess_block in my Drupal's 8 custom theme. I could not able to find any properties that may be changed to adjust some blocks weights in the theme.

For example, suppose I would like to make search block comes before branding block?! The only way that I have able to do, is not programmatically. It is through the structure > block layout.

Parent event node and child node

Hi guys,

I want to make an event content type with information, pictures, comments, recommendations, likes, etc. ***this is the parent***

And I want to make an child event that contains the information of the parent. But this child consist with date and available places. When this child events is completed then people can comment, upload pictures etc. on the parent.

Next year they can make a new child event (with a new date and available places), but they can see recommendations on the parent.

I figure out a best way to set this up. Who have some idea?

D8 - Validating Fields Programmatically

I have a custom content type with some fields, and I want to programmatically validate them. I tried hook_node_validate but it didn't work. What's the correct approach in Drupal 8?

D8 -- Problem using custom entity in entity reference field

I've defined a custom entity (content entity) and a corresponding bundle entity (config entity). They're all working fine: I can create bundles of my entity type in the UI and I can then create instances of said bundles, just like a node content type. I now want to use my custom entity in an entity reference field, but none of my content shows up in the entity reference field, either in a code-generated field or an entity reference field added to a content type in /admin/structure/types.

Here's my content entity annotation:

Colobox module not working on Drupal 8

Hi,

I have recently installed Drupal 8 and I try to use Colorbox module which doesn't work. Can anybody help me why? I am new with Drupal 8. My last Drupal site was in version 6, so years ago.

How to uninstall Drupal8 without uninstalling Drupal7

Hi,

I have installed a few sites on Drupal7 that work all right and then I wanted to try Drupal8 (which I messed-up) for other websites on the same shared hosting.

How may I remove the Drupal 8 installations without affecting the Drupal 7 ones ?

I appreciate your help,
kerwan.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x