Are views fields supported by this module? Everything works great except I cannot get the newsletter to use the views fields I specify, it only uses the node content. I saw this issue: http://drupal.org/node/697628. There it has a brief discussion on using fields but doesn't seem to definitively say that they are now supported.

I'm using the latest dev release and have also tried the latest stable release as of 4/19/10.

Otherwise, thanks for a SPECTACULAR module!

Comments

apt94jesse’s picture

A little additional info:

I've already set up and sent one sunmail newsletter using the node content, then I went in and changed the view to use fields. Maybe this is causing the preview to use the last one that I sent and it will fix once it resends.

I also tried rearranging the how the cck fields display in the content types>manage fields area, and that didn't change the sunmail preview either, so one of two things is going on. Either the sunmail newsletter is only capable of displaying the nodes in the default node configuration, or it's using a cached preview based on the first issue of the newsletter I sent.

I'll document if I figure anything out, but help in the meantime is greatly appreciated. Thanks.

apt94jesse’s picture

Sorry for the quick updates but I want to document the issue. I went ahead and initiated another send it still kept the node view instead of using the fields, and it did not update the order of the cck fields that I specified.

Also, I disabled the post date and author from displaying on the node via the theming admin area and that content still showed in the sunmail newsletter.

apt94jesse’s picture

Wow, I'm over-documenting this at every step. Hopefully it will help someone save some time.

So I just reread the documentation and got this paragraph:

The two included XSL files only use the basic information provided for each node, but additional XSL files can be uploaded via the module's user interface to redesign the existing text or HTML newsletter or add brand new designs.

This is the first time I've ever worked with XSL, so I'm coming in ignorant, but what I've gathered is that the xsl files are actually something like xml templates for the newsletter content. To use fields, I'll need to use a custom XSL file, which I'll have to learn to write, but then I can upload it via the admin area.

Sorry again for the premature questions.

apt94jesse’s picture

Status: Active » Fixed

OK, 15 minutes and 5 posts later, I've solved my own problem. Again, hopefully this will save someone else time, but if not, at least I'm not stuck any more.

Here were my steps to use views fields:

- Enable the fields in your view
- Go to the sunmail newsletter preview and view the xml preview
- pull the field name from the xml preview
- edit the html xsl file to use the field name you pulled from the xml preview
- voila, it should work

I'm using this module for a weekly event reminder, so I wanted the cck date field I added to display instead of the 'node created' date. After all, I want to be able to show this week's events and not something months away if I add it to the site early. The xml preview showed the date field had a name of 'field_event_value', so I simply pasted that in place of the 'date' value in the html xsl field.

Easy, even for someone who had never opened an xsl file in his life. I guess my confusion came because I was trying to get out of opening the xsl file for fear I wouldn't want to invest the time to learn it. If you're in my shoes, that's 15 minutes total.

Again, sorry for the wasted issue, I'm closing it now. Thanks again for the wonderful module that's even more configurable than I originally thought.

Mike Wacker’s picture

Good to see you figured it out. I'll take a look at this thread again in the future and see if there's any ways I can improve the documentation based on what you wrote.

Status: Fixed » Closed (fixed)

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

drupalok’s picture

Status: Closed (fixed) » Active

i am sorry to reopen this, but i followed the instructions from #4 and cant get it working.
in the xml preview o sunmailer are just the fields that are visible in the normal text or html newsletter. not the fields i added in the view. is this a bug or am i (doing something) wrong? i tried both: node view and fields view... both show the same results.

thanks a lot for this (very needed) module and for helping!

drupalok’s picture

or to be more clear:

how do i get my cck fields from my view to the mail?

i tried this:
<xsl:value-of select="field_fieldname_value"/><xsl:text>&#13;</xsl:text>
and
<xsl:value-of select="field_fieldname"/><xsl:text>&#13;</xsl:text>

both did not work

drupalok’s picture

Status: Active » Closed (fixed)

came to the solution that the problem is somewhere else:
http://drupal.org/node/801208