Closed (fixed)
Project:
Simplenews
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2012 at 13:52 UTC
Updated:
19 Mar 2013 at 10:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
miro_dietikerIs it a panel node?
Basically we rely on node_view to render the node content.
If panel will take over the node rendering process that way, we're fine already.
Other rendering cases need a few custom lines to trigger. Search for the node_view calls and learn what's happening there.
The pane caching won't help too much without custom plugins to cover the newsletter cases for personalized newsletters. Note that for non-user subscribers the context is the (user) anonymous page caching.
Comment #2
miro_dietikerComment #3
luksakI had the selection rules configured wrong due to a variant clone... I have this issue so often that maybe I should code something that always redirects me to the selection rules when cloning a variant. I am sorry for the false alarm.
Well, pane caching can become particularly useful when sending to users where you have a part that is not personalized.
Comment #4
miro_dietikerThank you for the update.
Comment #5
luksakThe node is still not being displayed by panels. I am using ctools dev and panels_everywhere. May one of those be the problem?
Comment #6
miro_dietikerIn that case it's again a feature request (that is not on our roadmap yet). So we're happy to include it with your patch.
Since panels everywhere modifies the global page rendering with elements from the content context, i expect it to be incompatible with our rendering strategy.
We only render the node content part and don't trigger the global rendering mechanism. Instead we replace the page rendering with a custom rendering process, introducing header and footer.
For your requested support, we would need to switch to a separate newsletter theme that provides a separate page.tpl.php and html.tpl.php and so on...
Then, we would not only trigger node_view, but the global page rendering with the node context.
I would expect that panels everywhere then would just do hat you expect.
Alternatively, we can introduce additional file suggestions in preprocess functions...
http://api.drupal.org/api/drupal/includes%21theme.inc/function/template_...
http://api.drupal.org/api/drupal/includes%21theme.inc/function/template_...
and stay with the regular rendering. A theme can then introduce newsletter specific variants of the design.
I expect we would drop the current footer concept then and place it with a different rendering mechanism (such as a block or into the page render array / page preprocess)
Finally to tell: i would love to see an initiative that introduces mime mail support that defines a standard that most themes adapt and additionally to the browser theme provide a mail theme that is fancy and well tested.
(Also note that most mechanisms like floating with modern div based layouts instead of tables don't work with most mail clients.)
Looking forward to your improvements.
Comment #7
luksakYour first approach sounds like a bigger task... Which of both is the cleaner approach in your opinion?
The problem is that I got the newsletter working without panels and I don't need this feature desperately. But if it is not too hard I'd give it a try.
We had the discussion about joining forces for one solid mime mail system at #1122910: Compare HTML Mail with Mime Mail. I did not have the time to check out htmlmail again.
Comment #8
muschpusch commentedI think this get's even more interesting in combination with: McHammer
Comment #9
rlmumfordI think this is already done with the latest version of Panelizer (7.x-3.x-rc1).
Comment #10
muschpusch commentedrlmumford: hm? Please explain a bit more!
Comment #11
andrewbelcher commentedWith the new version of Panelizer (3.x) they allow you to create Panelizer settings for each display mode of any entity (node or otherwise). Since Simplenews uses a display mode for the way a node is rendered, you can use Panelizer to build that display mode, therefore allowing you to use Panelizer to build your templates.
However, the caveat on that is that there is currently a bug I found in Panelizer (#1833826: Allow all view modes to be customized) that stops this from actually working as the Simplenews email view modes are disabled by default. Once that is fixed, which I'm hoping to have time to write a patch for, it will work!
I imagine it'll be tricky to use Panels (ie page manager/tasks) to compose emails, as it uses the menu system for it, rather than hooking in at the build phase, which is what the new Panelizer does. So my suggestion would be not to put effort into making Simplenews support Panels, but to wait until Panelizer fixes the bug or even post to the issue there to help speed that one up!
Comment #12
summit commentedHi, the post http://drupal.org/node/1833826 seems solved. Does anybody have a solution to use panels-panes to build the newspaper?
It would be great to be able to set one node left, the other one right etc...
Thanks a lot in advance for your reply!
Greetings, Martijn
Comment #13
andrewbelcher commentedYes, that is now fixed. #1914138: Unsettings $build['#theme'] prevents you theming or using panelizer is the only thing blocking it now. I think there has been a proposed solution to that, so I'll take a look later and see if I can get a patch up for it. Once that is resolved, it is a really simple case of panelizing the correct view mode and you're good.
One thing to note; email clients don't tend to have very good css support resulting in the need to use tables for layouts in emails. That means you'll need to create your layouts with tables rather than using the stock layouts/layout builder as they all use web oriented divs.
A panelizer submodule to simplenews that provides various table base layouts may be a good way to go if there is enough demand for it...
Comment #14
summit commentedHi,
Would love to see a simplenews-panelizer submodule with tableformat.
I am volunteering to test such a submodule. I think this would be a great add-on because the layout of the newsletter can than be ultimate controlled.
Thanks a lot in advance for considering building such submodule!
Greetings,
Martijn
Comment #15
andrewbelcher commentedThere is now a patch in the related issue which hopefully will be able to go in soon and I've attached an example panels layout which you can use to see how to do it.
If you want some email friendly panels layouts to be packaged with simplenews I would suggest you create a new issue for it.
Comment #16
andrewbelcher commentedSorry, here are the examples... The php files have a .txt extension that is just there so they can be uploaded.
Comment #17
summit commentedHi,
As suggested I made a new issue for email friendly panels layouts to be packaged with simplenews.
http://drupal.org/node/1933822. Thanks a lot in advance!
Greetings, Martijn