Escape DNBUY.NET

Once upon a time dnbuy.net (dnbuy.com) was a good place to purchase a domain. Over time, though, their price just went up and their support went down. The support is so low that I’m not sure there’s even anyone living running the business anymore. Given how bad the support is, its very strange that their price just kept going up. Perhaps an inheritor who doesn’t understand or care about the business is now just trying to squeeze it for all he can.

At the time of this writing domains with dnbuy are $25 a year.

You can transfer them easily to enom.com for $14 a year.

Drupal 8 add class to content

In Drupal 8, here is a way to add a class to the content and not the entire node type.

Turn on twig debug to find template names.

Go to your theme / templates folder

Edit node.html.twig.

Wrap the article tag with a blog so you can override it in an child template.

{% block article %}
<article{{ attributes.addClass(classes) }}>
{% endblock %}

Edit your child template that extends node.html.twig.

Add classes using merge.

Ex.

Drupal 8 twig snippets

Ternary operator ​​​​​

{% set foo = true %}
{{ foo ? 'FOO IS TRUE' : 'FOO NOT TRUE' }}

If then else

{% if node.getType == 'photo' %}
...
{% elseif node.getType in ['book', 'page'] %}
...
{% else %}
...
{% endif %}

Misc

{{ $uri = path('entity.node.canonical', {'node': node.id}) }}
{% if '/services/' in url %}
{% if uri starts with '/hismb' %}
{% if node.getType == 'photo' %} 
{% if node.getType not in ['text', 'misc' ] %}
{% if not page %}
{% if page %}

Date ranges

Drupal 8 add classes to body using URL

https://www.heididev.com/add-class-body-based-path-alias-drupal-8

Turn on twig debug.

Locate view template in use.

In my case, they were in

profiles/cms/themes/contrib/bootstrap/templates/views

In views-view.html.twig I found the div containing the views-content class.

Adding "container" to views-content and to views-header allowed a full-width content section to behave with expected margin yet have full width background image.

 

Pages

Subscribe to Front page feed