How to unserialize markup

So I have this serialized string in the #markup:

[{"title":"\u003Ca href=\u0022\/node\/19\u0022 hreflang=\u0022en\u0022\u003EPromotion 2\u003C\/a\u003E","field_image":"\/sites\/default\/files\/2018-............... yes, it is a rather long string ;)

how can I convert this to a php array or a json valid string. I asked google but all I was getting was how to serialize object into markup, not the other way around.

how to keep view default classes in a custom view twig template

Hi drupalers!

I created a custom view template page for my view. I just copied the core /modules/views/templates/views-view.html.twig file, put into my custom theme folder and named it like views-view--myview--page.html.twig

Everything is fine, but I noticed that all default classes like " view view-myview view-id-myview" are stripped away, and the only class set is the view's dom-ID.

Looking at the file, this is expected, cause it has just the twig array

Module suggestion - Simple HTML field editor

Hi,

Fairly new to Drupal and have inherited a D8 site to maintain. 

One of my regular tasks is to embed html forms from a CRM system into pages.

The site is CKEditor and I have been using the 'Full HTML' setting to paste the forms into. The trouble I am having is that it adds things like &nbsp where there are empty divs which is no good. I've been through all the settings on CKEditor but nothing solves this.

I need a pure HTML field editor that simply outputs the HTML as it is even if there are errors without it trying to correct it.

How to insert link in editor with node/nid but display as the alias when published?

When I'm editing a page, how can I add a link using the node # but when hovering over or copying shortcut takes the alias?

For example: 

In editor : <a href="/node/123"> My Link</a>

But on the published page it should display the alias "http://www.website.com/alias

This way if i update the alias on node/123, it will display "http://www.website.com/newalias" rather than the old alias and redirect.

Thanks!

Can't display content.body in Twig template in zurb foundation 5

I am using a child theme of zurb foundation 5.x. I have created a specific Twig template to display content as needed. I am able to display all fields except the body. Here is an excerpt of my node--lab-test.html.twig file:

<div{{ content_attributes }}>
  {{ content.field_short_name }}

Media Browser Filter Issues among other things

I am working on a Drupal 8 site and using the media browser as a WYSIWYG button for browsing for media.  I have some issues that I've been unable to resolve and hoping someone has been through this already.

Here's what I've got for installed modules: 
media_entity_browser-8.x-2.0-alpha1
inline_entity_form
entity_browser
entity_embed
file_entity_browser
embed
dropzonejs
video_embed_field
entity

I've also added the imagesloaded, masonry and dropzone libraries to my installation.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x