Where to use the widget after creating it?

Created on 22 May 2024, about 1 month ago
Updated 6 June 2024, 20 days ago

Hello,

Where to use the widget after creating it?

Is it used on any editor that supports Twig filters? Then using like {{field_name.value}} to get the content of field?

When I tested like this, I didn't get anything by the field. Test by drupal 10.2.4

Additionally, when I click Save and Continue Editing button, the page prompts: The website encountered an unexpected error. Try again later.

πŸ’¬ Support request
Status

Fixed

Version

1.6

Component

Documentation

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @msn5158
  • πŸ‡¨πŸ‡³China ipumpkin

    Hi guys,

    Where to use the widget after creating it?
    The widget is created for render entity with specific entity type/entity bundle/view mode/theme, the module will automictic render your template when all above condition match.
    Is it used on any editor that supports Twig filters?
    twig filter is not required, you can use any filter allow twig code
    Then using like {{field_name.value}} to get the content of field?
    that's right, Use {{ dump(_context) }} to debug avaliable variables.
    When I tested like this, I didn't get anything by the field. Test by drupal 10.2.4
    you can try to test on node/article
    Additionally, when I click Save and Continue Editing button, the page prompts: The website encountered an unexpected error. Try again later.
    this is a bug fixed in version 1.7

  • Hello,

    I have understood some, but there is still an important point that I have not understood, As shown in your picture, where to show the data from the third image displayed, which link or url?

    I created a widget, but how to use it and where to display the data of the widget twig template to the webpage. Thank you.

    The third image as following:

  • πŸ‡¨πŸ‡³China ipumpkin

    you can create a widget for node article with template content {{ dump(_context) }}, and then go to the node article page /node/1.
    The widget will effect where the entity displayed.

  • OK, I know now, thank you, It is somewhat similar to inline_formatter_field β†’ , it can enable different Twig template for each node's view mode. It can be used in views. Additionally, it can also serve as a twig editor.
    ο»Ώ
    They are similar but some different, so I leave it here. If possible, you can link to each other in similar module.
    ο»Ώ
    Of course, it depends on your decision. I am just a user and have no other intentions. I hope more people know about good things. at the same I am very grateful to the contributors of these modules, including you.

  • Status changed to Fixed about 1 month ago
  • πŸ‡¨πŸ‡³China ipumpkin

    Thank you for the infomation.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024