This forum is for assistance with theme development.

How do I get to reference images in my Twig files?

Hello, I've been making a theme for Drupal 8, but I can't seem to find a way to reference images in my Twig files, at least not in a way that satisfies me.

I've found that this:
{{ url('<front>') }}

gives me this:
https://localhost/drupal/en
or
https://localhost/drupal/es

Marinelli Live Demo Link

Either the link has been hijacked or the site pointed to has change and is no longer using the theme.

I have not posted for a while and am not certain where this should really be posted. If there is a better place please let me know.

Zurb Foundation Theme Help with full width row

I'm new to Foundation, but was able to build my site design outside of drupal in about 2 hours. So, then I started trying to port that over to a drupal sub-theme of Zurb Foundation and I'm tearing out my hair!

Can anyone summarize the best way to go about utilizing foundation theme with drupal?

Specifically what I'm having trouble with is:

outside of Drupal I have this:

Theming node fields inside content type question

Hi all

While overriding a node for one of my content types, I realised I can output the value of the field/s in different ways, which both produce the same result.

Example:

$address      = $variables['elements']['#node']->field_address[LANGUAGE_NONE][0]['value'];
$address      = $content['field_address'][0]['#markup'];
print $address;

Both of the snippets display: 24 Drupal Road

Adding field value to CSS through JS

Hi guys, I am trying to insert the value of a field (which is an image URL) in a CSS property. I am doing it through JS. This whole code will go in a theme file.
I am wondering whether something like this is correct in Drupal:

        drupal_add_js('jQuery(document).ready(function () {
          $(".myDiv")
          .css({"background":"url("
            . render($content['myField']) .
          ")"})
        });', 'inline');

I cannot find Bootsrap Sub-theme

Hi I'm new here, also new to Drupal

I cannot find Bootstrap sub-theme I followed all the steps, have been at it for hours (14 hours over 2 days to be exact, no exageration) (fully frustrated) It has gotten to the point where I cannot think for myself anymore I need help.

Pages

Subscribe with RSS Subscribe to RSS - Theme development