This forum is for assistance with theme development.

Output entity reference field value and url on twig

Is there a way I can output the link of an entity reference aside from displaying the label. I have an entity reference field that links to a page node content type. I'm trying to figure out how I can output the link.

Here is the sample of the code I've just created. It shows the label of the entity but it does not come with link.

I tried using `entity.uri.value` or just `entity.uri` to output the url

Default zircon theme using bartik theme's logo.svg

Hi:
I am going mad here, my default theme is zircon and when I view the page it is using bartik theme's logo.svg file, totally crazy. I am not sure how that is happening and why.

Under page.html.twig

 img src="/core/themes/bartik/logo.svg" alt="Home" 

How could this happen ?
Do I have to replace that logo.svg in bartik with my logo ?

Design /Theme

Hello, :)

If there is perhaps Tutorial videos or instructions, around the design for a well-chosen Theme
to adapt or has somebody collected there already experiences?

In general to the design / construction of contents I have a few questions:

Output entity reference link uri aside from label

Is there a way I can output the link of an entity reference aside from displaying the label. I have an entity reference field that links to a page node content type. I'm trying to figure out how I can output the link.

Here is the sample of the code I've just created. It shows the label of the entity but it does not come with link.

I tried using `entity.uri.value` or just `entity.uri` to output the url.

Site-wide background image in D8

Anyone had luck changing the background image in D8 to a fixed background image file ?

I looked at themes/theme-name/css/style.css

body {
line-height: 1.5;
font-size: 87.5%;
word-wrap: break-word;
margin: 0;
padding: 0;
border: 0;
outline: 0;
background-image: url('../images/main-bg1.png');
}

This is not working.. not sure what else can I do ?

Customizing a Bootstrap theme

I would like to know how to customize a theme.
Question #1: all html elements like header, section, footer etc can be removed from the Drupal interface?
Question #2: I am working with a Bootstrap theme and there is a section that has 3 columns (each with an image and text), but I want only 2 columns with this same content, how/where would I modify this? I am confused when to modify content with block.twig, node.twig and when in the view mode. Also what sections of a page are block, nodes, view mode part of? And with any I can modify this Bootstrap theme?

Pages

Subscribe with RSS Subscribe to RSS - Theme development