This forum is for assistance with theme development.

Themes and Forums

Hi, I was considering purchasing a pre-built Drupal theme. One thing I'm not clear about is how the themes work with the Forum module. That is, does a theme need to explicitly support the Forum module or would the standard styles defined in the theme work for the forum? Most themes I've seen do not have sample pages for Forums so I'm not sure. Any advice with regards to forums/themes would be helpful.

Thanks.

Help with D8 .theme preprocessing and field manipulation

My head is stuck in D7, can someone assist in how I need to manipulate field values in preprocessing for D8?
Here is where I am now. It semi-works as in I am getting at the field value I need to drop into a var for twig, but I cant figure out how to remove/unset the field so it wont render.
Also I am fairly sure there this is the wrong (long) way of manipulating field values (can someone put me on the right path?) Any assistance greatly appreciated!!!!

CSS Cache - Rebuild

I don't know if this is the correct place to ask this but I have the following situation:

I've created a custom sub theme based on the foundation base theme on a local test server.
I uploaded the custom sub theme to the web server and configured it for use.
Checked the site online and everything seemed in order.

Proper way to create a Newsticker in D8

Hi,

I created a content type "News" with different fields like title and text. Now I would like to show only the Headlines and maybe the creation date like a small newsticker on other pages.
So I think a view with a display "Embed" is the first right step to do this.

For showing the rendered view in a template I found this solution for my THEMENAME.theme:

function THEMENAME_preprocess_node(&$variables) {
//do some checks of right node type etc...
$variables['newsticker']=views_embed_view("news_view","embed_1");
}

Drupal 8 One-off Custom Page for Theme

Wondering if anyone can provide pointers for the following:

I'd like to create a one-off custom page which will contain several text fields.

The layout for the page will be custom, placing the text fields in various locations next to design elements which will include diagrams and maps. I'd like the site editors to be able to update the text fields/labels, including language versions.

Right way to use Entity References in D8?

Hi,

I think one of the greatest plugins of D7 was the "Entity Reference" plugin.. Now its include in D8 in core but it seems like nobody knows how to use it..

I really can't figure out how to display field values of an referenced entity in my template.
Does anybody have an idea? Do I need to create a preprocess function with all the business logic and pass it to the template? Is there maybe already a "twig function" for getting field values of an referenced entity?

Thanks for your help,
Mo

Pages

Subscribe with RSS Subscribe to RSS - Theme development