- Issue created by @dominictaylor
- 🇳🇿New Zealand dominictaylor
I have found a workaround for this using another module.
1. Install https://www.drupal.org/project/views_field_view → . You can use this to embed a view within a view.
2. Create a view, e.g "Node Tokens View" which filters for the content type and by the ID of the node in the url. Select the fields you want and make it display on the content type you're wanting.
3. Create a Views Send View block, and embed the Node Tokens View. Make it hidden if you like.
4. Now you can access the Node Tokens View content as a token in the Views Send View Block.This has worked for text type fields and adds a link for attachments to their url. If I can rewrite the url I think I can get the attachments to show up in the email too.
- Assigned to hansfn
- 🇳🇴Norway hansfn
I get reports about the opposite problem, but I'll look into this - this week.
PS! Please consider trying to reproduce the problem with Drupal 10.
- 🇳🇴Norway hansfn
I can't reproduce this - tested for D9 and D10.
Is the view a page or a block? I normally only creates pages when I want to send e-mail.
The work-around was very tedious :-) What tokens do you use for the "Now you can access the Node Tokens View content as a token in the Views Send View Block." step?
- Status changed to Postponed: needs info
over 1 year ago 7:52am 18 October 2023 - 🇳🇿New Zealand dominictaylor
Hi hansfn,
The Node Tokens View and the Views Send View were blocks. The Views Send View block only shows on a content type, "Event" because I wanted to get data from it and send it via the Views Send module. Yes, it was tedious, but it worked! The token values were for the node body and title, I can't recall what the name for them was.
But, to be honest, I should say, I ended up finding a different solution using Webform. I mention this in case anyone else has a similar problem, maybe that would help them, ( feel free to contact me if you do).
If you like I can recreate the problem to get more information?
- 🇳🇴Norway hansfn
I think I know what is going on - your views doesn't have nodes as the base table. (Are you listing users or nodes?) Could you attached the view defintion (yaml file)? Export configuration and find the correct yaml file in the sync directory or whatever it is named.
I recently made an improvement that enable you to use node or user tokens when a nodes or user relationships is used in the view, by adding "Content ID" (nid) or "User ID" (uid) as a (hidden) field in the view. Please try the dev release → .