Is this module similar to aet?

Created on 1 February 2024, 11 months ago
Updated 3 March 2024, 10 months ago

Hello,

I see the code style of this module looks like aet , Are their functions the same?

💬 Support request
Status

Active

Version

1.0

Component

Miscellaneous

Created by

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

Comments & Activities

  • Issue created by @msn5158
  • 🇷🇺Russia _cosmos_ Izhevsk, Russia

    I looked up the AET module and was surprised that they are very similar.

    Although, when I developed the tokenlink module, I didn't see the AET module at all.

    But despite the similarity of tokens syntax, there are significant differences.

    The main idea of my module is to create a list of various template suggestions for token, to manage token rendering flexibility, while AET uses mostly view modes.

    Also, we want to be able to write some logic in templates, for example, we want to use different classes for node tokens depends on the node status (published/not published).
    Check out the templates for different entity types here https://git.drupalcode.org/project/tokenlink/-/tree/1.0.x/templates?ref_type=heads

    I suppose that using the entity view modes is too heavy for token rendering.

    However, in the token template, you can implement flexible logic and rendering.

  • Greate, hope to do better and better.

    Aet now cancels support for drupal8, in the past, it had an alpha version of drupal8. I don't know why, maybe you are right, it's too heavy for token rendering by using the entity view modes

  • 🇷🇺Russia _cosmos_ Izhevsk, Russia

    We are planning a small upgrade of the tokenlink module soon
    and will announce it then in issue in AET module.
    I hope it will be a worthy replacement of AET for Drupal >8.

  • Hello,

    Whether can it be applied to views? For example:

    [tokenlink:views:viewID:displayID]

  • 🇷🇺Russia _cosmos_ Izhevsk, Russia

    I dont think so, because view is not entity.
    You should try this https://www.drupal.org/docs/contributed-modules/twig-tweak-2x/twig-tweak...

  • Yes, I know this can be implemented, but in some situations, only tokens can be used instead of twig, such as view filters/contextual filters or some parameter settings of other modules which only support tokens and not support twig.

    I hope to obtain some data through the view and provide it to other views as parameter. In this way, I don't need entities to bind aliases and can create pages through views.

    Also, if I want to load JSON data to Twig to use, what should I do. Is there any way to achieve it? I want to provide data for each page from JSON by view.

    Kindest Regards

Production build 0.71.5 2024