This forum is for assistance with theme development.

Conversion of Existing Site Theme to Drupal 8

Good day,
From what I have read, there is NO easy way of using an existing theme from Drupal 6.x to Drupal 8. It would seem easier to find a Drupal 8 theme that is released and try use it as a basic template. This was built as a sub-theme version of ZEN. It appears that there is no Drupal 8 version of Zen. Does anyone know the best Drupal 8 theme that could be used?

Many thanks.

Same admin template for "journalist" roles

As admin i had well layouted node/add and node/*/edit pages styles, but once logged in as "journalist" (with grant to modify my own content) pages above hasn't the same layout.

From what i understand, Drupal doesn't load custom template set up with "theme_process_page(&$variables)" in template.php.

What i'm doing wrong?

Create links using node/# values

I'm trying to create a menu in a series of template pages using node/123 etc as the link value instead of hardcoding the url alias in case the page title (and alias) changes at some point in the future.

I've tried using drupal_get_path_alias('node/123') to reference node values, but all links are just returning the current page url alias.

Any help greatly appreciated.

No submenu displaying & moving account menu to main nav

Hi Drupal Developers.

I use stark theme, and i have subthemed it for your knowledge.

When i add submenus to my main nav, it aren't showing on hover - not even in raw without styling, and enabling "show expanded" doesn't work either - how can that be? is it standard for stark?

Also, i wanna move the account menu to the main menu (right side of the menu) - anyone know how to do this? Totally lost!

Thank you.

- Magnus

View template

Hi everyone, i have a problem in drupal 8:
i create a view called sportview and i have made a template for it called views-view--sportview.html.twig
and what i want is to print the body field or the image field
i try to do things in my twig like {{content.body}} or {{content.image field}}
but nothing displaying

How to add a class to an image field in view-views-fields template with twig

Hi,

I am trying to print an image field in a views template because I want to add a class to the rendered image field. How can I achieve this?
I tried this:

{{fields.field_image.content}}

it prints the rendered image just fine. But How can I add a css class?

this

{{ file_url(fields.field_image.entity.fileuri) }}

does not seem to give me the url of the image field. Is there any other way to achieve this?

Thanks for the help

Pages

Subscribe with RSS Subscribe to RSS - Theme development