[SOLVED] Collective.contentrules.mailtogroup versions

While we are at it:
It would be very useful it it was possible to get content of fields with some syntax (at least for Text / TextLine

maybe it could be done with some logic and syntax ${something/fieldname}

ANy idea where this replacements are defined?

This should go to the view call, some code is needed in the package to pass this properties in the rendered email. Nice to have, open a Ticket :wink:

If possible, can you past a link to github (where the view call is), and I will look at it tomorrow

I retract my answer above. You can define a custom adapter to define and replace a placeholder variables.

<adapter
  factory=".adapters.MyPlaceholder"
  provides="plone.stringinterp.interfaces.IStringSubstitution"
  for="*"
  name="myplaceholder"
  />
@adapter(Interface)
class MyPlaceholder(BaseSubstitution):
  category = _("All Content")
  description = _("Describe what your placeholder replace")

    def safe_call(self):
        return self.context.getFieldValue()

In your message text you can use lorem ipsum ${myplaceholder}

Many samples can be found in GitHub - plone/plone.stringinterp: Provides a ZCA pluggable simple template system with most Plone related variables already defined.

Yes, i would like to do it. but is it still a valid PLIP Status is "Stalled (approved but inactive)"

Thanks a lot.

I works for my usecase, but it would be very useful (in the future) if it was possible to make it generic (so it could use 'any field')

Is this theoretically possible, something like ${field/fieldname} or ${fieldvalue.fieldname} ?