Closed (works as designed)
Project:
Subscriptions
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Jul 2012 at 22:54 UTC
Updated:
29 Jul 2015 at 13:35 UTC
Jump to comment: Most recent
Comments
Comment #1
karingAre you looking for:
/admin/config/system/mail-edit
Comment #2
liquidcms commentedwell, yes.. but the only thing that is there is the digest tpl, not the digest teaser tpl - i.e. the tpl of what is included in each snippet that gets sent for each node being digested.
Comment #3
karingIn the mail digest template there is the !teaser (Replacement pattern in Digest item: section). Not what you're looking for?
Comment #4
liquidcms commentedi would think the digest is of the form something like this:
---------------------
digest header stuff
list of digest teasers for items listed in digest
digest footer stuff
-----------------------
so i need to define what the teaser is.
ideally something like:
========
title, author
field1, field2
created
========
Comment #5
karingSorry for the confusion... !teaser was in D6. In D7 it's node:summary. It already exists - no need to define it. Use:
[subs:items:index:#0:as-node:summary] - and use the handy Preview template button at the bottom.
Comment #6
liquidcms commentedi don't mean teaser as in D6 terms.. i mean the snippet of text that is included for each item listed in the digest.. i.e. the teaser.
or are you saying the [subs:items:index:#0:as-node:summary] token is the teaser view mode (see Manage Display for a node type)? so i can add what ever fields i want to display there and this is my digest "teaser", then the tpl for this will be used as well; since sadly things like author, created date, etc are manageable in view modes.
OR let me go about this another way.. how do i add a field to show in the "digest teaser"?
Comment #7
karingIf you want eg the title, the author and the summary - then you can do this in the digest template:
etc. just keep building - you can completely customize this.
Hoping this will help you.
Comment #8
liquidcms commentedi'll try one more time... how do i add a FIELD from the node to the digest teaser?
perhaps something like: [subs:items:index:#0:as-node:field_mycustomfield] ?
thanks for the help.
Comment #9
karingOK, this is the first time you've used the word custom :-)
So to recap:
1. There is no digest teaser template. The template is called: digest template.
2. To use the digest template to output node summaries in your notifications instead of full nodes use:
3. If you like you can add both standard Drupal fields as well as custom fields that you've created yourself:
In this example both field_slideshow_link and field_slideshow_order are the field (machine) names as shown in the Manage Fields tab of the Content Type these custom fields belong to.
Comment #10
liquidcms commentedok, cool.. sorry for the confusion. will try this out.
the field we are trying to add seems simply enough as it is a simple textarea field; but curious as to how this would work for more complex fields that are multis or have other parts (like a link field has title and url). perhaps it uses the display formatter defined for some view mode (?); still seems to be a few pieces missing to this.. but will give it a shot.
Comment #11
karingNot sure about more complex fields, but for a link - when using HTML - you'll automatically get:
<a href="Text in URL field">Text in Title field</a>Just like on the node itself.
Comment #12
karingI'll mark this as closed. Should you find anything is missing/not working when you add your custom fields, then please feel free to open another support (or feature) request.
Comment #13
mdu2 commentedI am trying this as well. Thanks for the useful examples. Just one more question: couldn't figure out the token to render the comment text in case of a comment. Any idea how to do this?
I tried:
Comment #14
karingCheck out the node-type-blog template to see the correct syntax for comment:author:name etc.
If you're going to mix-and-match (so your digest contains a mixture of content-types) then try this:
1. Add a template for all content-types that may be involved - and configure each of them.
2. Use :formatted in the digest template - which will use the template for the item as if the item were sent as a single message.
I've not tried this myself yet - but I've been told - reliable source - this should work!
Comment #15
mdu2 commentedGood hint with the mix-and-match but I am not sure how this works. In the mail-templates (admin backend) I have one for the digest and several other for other types. When I "Add" one of the non-digest templates I get the same template-content as I see when using the :formatted in the items-loop of the digest but with "Welcome .... blabla" around it. Are these templates used in the digest when using the :formatted notation but stripped of the welcome-stuff? How does this work/fit together?
Update: Didn't get the comment-thing in the digest work. Seems I am to stupid for this... :/ Where do all those default templates / formattings come from (the one with the ASCII-Arts style content?
Comment #16
karingOk, let me illustrate this with an example as well:
in digest template
[subs:items:index:#0:formatted]in a node-type-[your content type] template:
make an Edit
eg. change
Author: [user:name]to
By THIS Author: [user:name]save/update this
go back to your digest template
Hit Preview template -> voila there you'll now find it now displays the Author bit as:
By THIS Author
Comment #17
Sel_Space commentedI can't find the teaser token in digest template , I've tried this token [subs:items:index:#0:as-node:summary] , but it's not working
Comment #18
salvisSee the Subscriptions front page for why [node:summary] is not working and what you can do about it.
Comment #19
Sel_Space commentedNow I have another problem , [node:summary] is working for some content type but not for the others
Comment #20
salvisSel_Space: It's all there in #1300920: The [node:summary] token does not output anything for body fields without a manual summary
Please stop hijacking this issue.
Comment #21
salvisIf anyone is interested, the Fix Core module now has a fix for the empty [node:summary] token.
Comment #22
bdarshu commentedHow can I use tocken for node reference field? I mean, suppose I am having a field which is Node reference field and that field I want to use in Digest mail. How can I write the token for the same?