This forum is for assistance with theme development.

Problem with absolute and relative path for <img>

I have a custom page.html.twig file for my theme. I use some <img> elements in it.
While in localhost on my computer {{base_path}}/themes/images/x.jpg works fine and create absolute url of it, but when uploaded to my hosting only /themes/images/x.jpg is shown as image url. I have tried to replace {{base_path}} with mysite.com (use mysite instead of real url) but it still shows the same result. I have tried in other browsers with the same result... 
Cleared the cache several times too...
Do anyone have suggestions how to fix that?

Thanks in advance

Bootstrap Carousel

Hi all, total newbie here.
Trying to create a bootstrap carousel using view here but hitting problems
Drupal version: 8.5.6
Bootstrap 3

Tried following the video tutorial as below:
https://www.youtube.com/watch?v=WsLA7n9fknc

The carousel is showing as 3 pictures staked on top of each other.

Template suggestion nor override recognized

I'm a Drupal newbie. Installing Drupal and modules, creating content-types and creating an image gallery all went very easy. I'm impressed by the power of Drupal. But then I tried to add a line of text to a specific content-type, I have been trying in vain for nearly a week...

What I did:

I have a custom content-type with machine name 'image_of_imagemanager'.

In theme debug mode I found the following possible template suggestions:

 FILE NAME SUGGESTIONS:
   * node--41.tpl.php
   * node--image-of-imagemanager.tpl.php
   x node.tpl.php

Taxonomy term field in twig template

Hello-

I'm new to Drupal and do not have any experience with twig and very little experience with PHP. I'm a front end developer. 

I created a content type called Events which has 2 entity reference to a taxonomy term. 1 of the taxonomy term is called Venue and it in has the address field. How do I pull the taxonomy's address field value into my node--events.html.twig template? 

I searched online and was able to get the taxonomy term title and that's it: {{ content.field_venue[0]['#title'] }}

Thanks,

Amy

Different page template for different language in drupal 7

I have a site on Drupal7 using bootstrap theme. I have 2 languages (persian and english) and I need to make a completely different pages for per language.

my default language (persian) has "page--front.tpl.php", "page--video.tpl.php" and "page.tpl.php".

now i want to have "page--front--en.tpl.php" for example.com/en , "page--video--en.tpl.php" for example.com/en/video and etc. In fact, I need a function (theme_hook_suggestions) for template.php.

Could anybody give me a hint, please?

How to know the name of a theme?

Hi everyone!

My name is Santi (from Spain). This is my first time with Drupal - I would love to involve myself in this community.

We are trying to migrate our project from Wordpress to Drupal. We have no problems at the moment, but we need to find a good theme for a magazine. Our CEO is looking for a theme like the DailyWire.com one - they are using Drupal, as far as we know, but their theme is named "dw_theme" in their html: /sites/all/themes/dw_theme

I don't know if they developed their own theme, or they modified some existing theme.

Anybody could help me?

Pages

Subscribe with RSS Subscribe to RSS - Theme development