magento2 – Changing Magento 2 Page Builder Images to use and srcset

I am trying to change the magento2 page builder image to include picture and source set tag.

I made a module

app/code/(Vendor)/PageBuilder/view/adminhtml/web/template/content-type/image/full-width/master.html

I want to changed this code:

<figure attr="data.main.attributes" ko-style="Object.assign({}, data.main.style())" css="data.main.css">
    
        <a if="data.link.attributes().href" attr="data.link.attributes" ko-style="data.link.style" css="data.link.css">
            <img attr="data.desktop_image.attributes"
                class="pagebuilder-mobile-hidden"
                css="data.desktop_image.css"
                ko-style="data.desktop_image.style" />
            <img attr="data.mobile_image.attributes"
                class="pagebuilder-mobile-only"
                css="data.mobile_image.css"
                ko-style="data.mobile_image.style" />
        </a>

        <ifnot args="data.link.attributes().href">
            <img attr="data.desktop_image.attributes"
                class="pagebuilder-mobile-hidden"
                css="data.desktop_image.css"
                ko-style="data.desktop_image.style"/>
            <img attr="data.mobile_image.attributes"
                class="pagebuilder-mobile-only"
                css="data.mobile_image.css"
                ko-style="data.mobile_image.style" />
        </ifnot>
     
    <figcaption if="data.caption.html()"
        attr="data.caption.attributes"
        css="data.caption.css"
        html="data.caption.html"
        ko-style="data.caption.style">
    </figcaption>

</figure>

to this:

<figure attr="data.main.attributes" ko-style="Object.assign({}, data.main.style())" css="data.main.css">
    <picture>
        <a if="data.link.attributes().href" attr="data.link.attributes" ko-style="data.link.style" css="data.link.css">
            <source media="(max-width:767px)" 
                    srcset=" "  > 

            <img attr="data.desktop_image.attributes"
                class="src_set_image"
                css="data.desktop_image.css"
                ko-style="data.desktop_image.style" />
        </a>

        <ifnot args="data.link.attributes().href">
            <source media="(max-width:767px)"  srcset=" " > 

            <img attr="data.desktop_image.attributes"
                class="src_set_image"
                css="data.desktop_image.css"
                ko-style="data.desktop_image.style" />

        </ifnot>
    </picture>

    

    <figcaption if="data.caption.html()"
        attr="data.caption.attributes"
        css="data.caption.css"
        html="data.caption.html"
        ko-style="data.caption.style">
    </figcaption>
</figure>

How can I set it up so that srcset pull in the mobile image url?

8 – How to replace IPE with Layout Builder?

I am trying to set up a D9 site that will allow site Editors layout flexibility. I have read a ton of articles on how awesome Layout Builder is and how it finally does what Panels couldn’t do… hmm.. Yet, after a few days of various LB addon module tryouts; I still can’t sort out which set of modules provides the basic IPE functionality.

What I need is a set of layouts (per bundle) that Editors can choose from and then a set of blocks they can select from to add to the selected layout.

Ideally certain things would be placed into those layouts that could not be moved by the editors: title, tabs, etc. as well as body text or other fields set in default places in case the editors didnt want to add any additional blocks.

I think this was pretty simple to set up with Panels/IPE. Is it possible with Layout Builder (and any combination of additional modules)?

Puerto Family Tree Builder SAAS

Building a Family Tree with Puerto Family Tree PHP Script.
It is more than just a family tree. A new home for family memories.

Make your family tree live with Puerto Family Tree and do not leave it just a memory hanging. build it with the participation of everyone and make it stretch to infinity.

.

layout builder – How to set an ALL option on contextual filters passed to a view with twig tweak?

In Drupal 8, I have a twig tweak embedded view that passes variables from the Layout Builder dialogue to filter results in a custom block.

{% set event_type = block.field_filtered_events_event_type.value %}
...
{{ drupal_view('events_group_content', 'filtered_events', event_type, center_id, cat) }}

The filters all work great except I need an option for ALL results if the user doesn’t select anything from the filter. I have the “Display all results for the specified field” checked under “When the value is NOT available”, but it does nothing. If I try to insert the block without making any selections, it posts and empty block.

Is there a way to add an ALL option as the default values passed into the view?

Adding my attempt to unset if not selected –

<div>
  {{ title_prefix }}
  {{ title }}
  {{ title_suffix }}
  {% if block.field_filtered_events_event_type.value|render is not empty %}
    {% set event_type = block.field_filtered_events_event_type.value %}
  {% else %}
    {% set event_type = 'all' %}
  {% endif %}
  {% if block.field_filtered_events_center_id.target_id|render is not null %}
    {% set center_id = block.field_filtered_events_center_id.target_id %}
  {% endif %}
  {% if block.field_filtered_events_samhsa.target_id|render is not null %}
    {% set samhsa = block.field_filtered_events_samhsa.target_id %}
  {% endif %}
  {% set upcoming = block.field_filtered_events_upcoming.value %}
  {% set qty = block.field_filtered_events_qty.value %}
  {% if upcoming == 1 %}
    {{ drupal_view('events_group_content', 'filtered_events', event_type, center_id, samhsa) }}
  {% else %}
    {{ drupal_view('events_group_content', 'filtered_events_past', event_type, center_id, samhsa) }}
  {% endif %}
</div>

entities – Enable Layout Builder via code

I figured it out. You can enable Layout Builder by running the following code in a custom module:

$entity_type = 'node';
$content_type = 'article';
$view_type = 'default';

Drupallayout_builderEntityLayoutBuilderEntityViewDisplay::load("{$entity_type}.{$content_type}.{$view_type}")
  ->enableLayoutBuilder()
  ->setOverridable()
  ->save();

Hopefully this helps someone else. Having to do it via the UI is painful if you have a lot of content types. I’m actually surprised this isn’t a Drush command yet. Oh well.

Source: https://www.drupal.org/project/drupal/issues/3158916

Divi Builder Plugins – Additions to the Elegant Divi Builder

– Fixed a bug that caused animations to remove module design styles such as background colors.
* includes/builder/scripts/frontend-builder-scripts.js

version 2.12.1 ( updated 08-13-2018 )
– Updated translation files.
– Fixed issue with partial support for modules with child modules.
– Fixed playback issues of Facebook videos in the Video module.
– Fixed display issue with Video Module, with animation applied, in when playing the video in fullscreen, in Chrome.
– Fixed fullwidth mobile…

.(tagsToTranslate)nulled(t)nulled sites(t)nulled forum(t)nulled script(t)nulled scripts(t)nulled script forum(t)best nulled scripts site(t)xenforo nulled(t)xenforo 2 nulled(t)xenforo nulled themes(t)seo xenforo 2(t)xenforo themes(t)seo for xenforo(t)vbulletin nulled(t)vbulletin 5 nulled(t)whmcs nulled(t)hexa whmcs(t)whmcs addons nulled(t)whmcs templates nulled(t)whmcs template nulled(t)whmcs modules nulled(t)whmcs themes nulled(t)cs-cart nulled(t)xfilesharing pro nulled(t)blesta nulled(t)arrowchat nulled(t)multi vendor ecommerce script nulled(t)seo providers(t)adsense alternative

PHP Cost Estimation & Payment Forms Builder

Easily sell any customized services & products creating your own flat and responsive cost calculator or payment forms (even with subscription !) on your PHP website .
This unique plugin can be used to sell any type of service or products: applications, websites, graphics, seo, pets, lunar fragments …. or anything else.

Your customers can get an accurate estimate of their request (the final estimate/order is sent by…

.(tagsToTranslate)nulled(t)nulled sites(t)nulled forum(t)nulled script(t)nulled scripts(t)nulled script forum(t)best nulled scripts site(t)xenforo nulled(t)xenforo 2 nulled(t)xenforo nulled themes(t)seo xenforo 2(t)xenforo themes(t)seo for xenforo(t)vbulletin nulled(t)vbulletin 5 nulled(t)whmcs nulled(t)hexa whmcs(t)whmcs addons nulled(t)whmcs templates nulled(t)whmcs template nulled(t)whmcs modules nulled(t)whmcs themes nulled(t)cs-cart nulled(t)xfilesharing pro nulled(t)blesta nulled(t)arrowchat nulled(t)multi vendor ecommerce script nulled(t)seo providers(t)adsense alternative

laravel – ¿Cómo mostrar solo un dato relacionado en relación hasMany con Query Builder?

Hola a todos espero se encuentren bien. Estoy haciendo un proyecto en laravel 8, tengo 2 modelos Post e Image, Post tiene relacion hasMany con Image, Image tiene relación belongsTo con Post, estoy intentando mostrar los posts y una imagen (cualquiera) con mi api rest, aquí el código de la consulta para obtener los posts:

    public function index()
{
    //
    

    $post = Post::distinct()->
    join('post_images','post_images.post_id','=','posts.id')->
    join('categories','categories.id','=','posts.category_id')->
    select('posts.*','categories.title as category','post_images.image')->distinct()->
    orderBy('posts.created_at','desc')->paginate(10);
    
    $x=$post;
    foreach ($x as $key => $posts) {
        $posts("image")= Storage::URL($posts("image"));
    }

    return $this->successResponse($post);
}

Mi problema es que cuando un post tiene 2 imágenes, en el código json recibo ese post duplicado con el campo image diferente, algo así:

{
id: 404,
title: "probando relación",
url_clean: "probando-relacion",
content: "<p>probando relación</p>",
posted: "not",
category_id: 1,
created_at: "2021-04-08T21:43:24.000000Z",
updated_at: "2021-04-08T21:43:24.000000Z",
category: "Categoria 1",
image: "/storage/SbSZWLn83MEFPHKU1UQU3W0aAqpNTlbDGhUvmyoH.jpg"
},
{
id: 404,
title: "probando relación",
url_clean: "probando-relacion",
content: "<p>probando relación</p>",
posted: "not",
category_id: 1,
created_at: "2021-04-08T21:43:24.000000Z",
updated_at: "2021-04-08T21:43:24.000000Z",
category: "Categoria 1",
image: "/storage/fv1mNp3dbvKggx1cpwPf3E3sB6hw3ItpcS1JKmzV.jpg"
}

Y solo quiero mostrar uno, como puedo hacerlo?. Muchas gracias.

theming – Adding layout builder enabled template suggestions on page-level twig

I want to detect if Layout Builder is enabled (D8), so that I can add a new page and page-level twig templates that will allow a completely different structure for my site – in this case based on Layout Builder’s layouts.

I found this resource :

/**
 * Implements hook_theme_suggestions_HOOK_alter() for page templates.
 * @param array $suggestions
 * @param array $variables
 */
function MY_theme_suggestions_page_alter(array &$suggestions, array $variables) {
  if ($node = Drupal::request()->attributes->get('node')) {
      if(!empty($node) && $node instanceof DrupalnodeNodeInterface) {
          $type = $node->getType();
  
           // Add content type suggestions.
          array_splice($suggestions, 1, 0, 'page__' . $type);

          // Add layout builder enabled template suggestions
          try {
              $entityTypeManager = Drupal::service('entity_type.manager');
              $storage = $entityTypeManager->getStorage('entity_view_display');
              $view_display = $storage->load('node.' . $type . '.default');

              if (!is_null($view_display)) {
                  $layout_builder_enabled = $view_display->getThirdPartySetting('layout_builder', 'enabled');
                  if($layout_builder_enabled) {
                      array_splice($suggestions, 1, 0, 'page__node__layout__' . $type);
                      array_splice($suggestions, 1, 0, 'page__node__layout');
                 }
              }
          } catch (Exception $e) {
              Drupal::logger('type')->error('Error in ifac.theme ifac_theme_suggestions_page_alter' . $e->getMessage());
          }
      }
  }
}

But in my case this code only works for node types “article”.
What can I do to make it work for others node types using layout builder?
Any suggestions?

Header builder etc. options missing from customize area

I wish to edit my default theme header, change the logo etc.

When I click customize there are almost zero options for this. I have a few basic plugins installed but I cannot see how that would affect this.
What should i do?

enter image description here