This forum is for assistance with theme development.

Block doesn't render if request come while cache-rebuild

I have custom block its working normally as expected but while i am doing cache-rebuild if one of the users request that page ( which contains the block ) block dissepear , block have custom twig template which not rendered in this case i need help i open for any solution 

Thanks.

Overriding profile2 user registration on 2 different urls

in your theme's template.php add following code

problem:Default Theme (Bartik & seven) Is not applied for Drupal 8.6.1 after its installation ,

I've several times Installed Drupal 8.6.1 on the server, but after installing no themes were shown(both Bartik, seven for control panel).

what should I do, How can I solve this problem?

How to print date in node twig file

Here are the four easiest ways I’ve found to show dates via Twig inside of a node template.

They all result in the same output.

Use the field’s format settings; include wrappers

1

{{ content.field_blog_date }}

This is the only example that includes wrappers. The rest output just the date.

Use the field’s format settings

1

{{ content.field_blog_date.0 }}

To create downloadable link on front page

I am providing below code for creating link to downloadable files and make them download on your web application:

I assume the file url has been set in url that can be encoded such as:

https://www.drupal.org?destination=file-url

/**
 * Implements hook_preprocess_HOOK().
 */
function vf_theme_preprocess_page(&$variables) {

Pages

Subscribe with RSS Subscribe to RSS - Theme development