Question

Photo of Kjell Nygren

1

Email wizard, templates and columns

I posted a month ago asking if anyone has any templates to share that work with the wizard. Would still love to see some examples of how people have leveraged the wizard templating system. Original post.

Update

My struggle has been to figure out how to reference in my design the elements in single column and multi-column sections. Nothing seemed to work right. Since the documentation is pretty light on what the wizard outputs as code for the email I went ahead and created the most basic wizard template I could:

<div class="structure-dropzone">
    <div class="dropzone">
    </div>
</div

Creating a new communication, using that template, I was able to see what code gets output and discovered why I was having such a difficult time targeting elements for visual styling and layout. If anyone else is trying to do this, you'll need to convert the base64 that Rock creates (https://www.base64decode.org/).

What I found

The two column (and I presume 3 column and sidebar) elements are laid out in a table with a class of "row" with the grid classes according to the appropriate columns:

<td class="dropzone columns large-6 small-12 first width="50%" valign="top">

More or less, that's what I expected to see. Bu the single column section doesn't do this. This has caused me some headache as I'm trying to build a template that can rely solely on the editor without having to add tables surrounding the dropzones which would add extra space and possibly cause issues with responsiveness and ultimately not be removable by the end users (who are not technical or code savvy at all).

So what?

I'm curious if this was done on purpose? I think semantically that if the multi-column sections include the table class="row" then the single column section should include it as well. Is it possible to edit what the section buttons generate? I'd assume it's part of the compiled code in the core of Rock. 

I'd love it to output the following for single column sections. This would result in wide compatibility with designs, and fit with the other multi-column sections.

<div class="component component-section" data-state="component">
    <table class="row" width="100%">
        <tbody>
            <tr>
                <th class="dropzone columns large-12 small-12 first last" width="100%">
                    <!-- component text, image, divider, or button -->
                </td>
            </tr>
        </tbody>
    </table>
</div>


Something else that tripped me up is that the Zurb Foundation styling relies on <th> for defining columns. It appears Rock generates columns using <td> in the wizard template. It's easy to correct in the CSS, but may trip up any table in an email that's not meant for layout. It also adds an extra step in templating. 

If I'm wrong in my understandings about how this is supposed to work, please correct me. My goal is to create some templates that are easily re-brandable that can be either packaged with Rock or shared here or on the Rock shop.

  • Photo of Steven Miori

    0

    This is good stuff, I'm surprised to not see a response here. Have you had any luck getting answers? Would love to see more GREAT email templates shared and developed in the Rock Community.

    I've also seen the weird space issue you are talking about in the wizard. If you have a good email template or two you'd be willing to share, email me! I'd greatly appreciate it. Thanks

    • Kjell Nygren

      Thanks Steven. I'm really disappointed, if I can be honest. I've posted in chat, talked to developers, and had two forum posts go crickets.


      I think the lack of templates in the community at large speaks to the state of things. We've moved to using Pro.BeeFree.IO for email templates. We paste those into a simple non-wizard communication.


      Benefits of Bee:



      • Images are hosted on Bee. We've had issues where uploaded images in Rock don't create proper URLs.

      • Templates are responsive and well designed.

      • It's free for non-profits.

      • Their nice people.


      I kind of just wish that Rock would tie directly into Bee for email creation rather than the wizard that's there now.

  • Photo of Jon Edmiston

    0

    It's been a while since we developed that code, but I believe the thinking was that a single column really wasn't a table or row so don't label it as such. I don't think we could change that now without having impact on established templates.  There's not a way to edit what the sections insert into the markup. While that would be nice, it would limit the re-use of templates.

    Hope this helps!