Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Email pages, and keep track of how many times each page was emailed.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
autotest
db/migrate
lib
test
LICENSE
README.rdoc
Rakefile
email_page_extension.rb

README.rdoc

Email Page

Email pages, and keep track of how many times each page was emailed.

Installation

$ cd <radiant_app>/vendor/extensions/
$ git clone <email_page_git_url> email_page

Usage

Add this to pages that should be emailable:

<a id="email_page_link" href='<r:email_page:url/>'>Email This Page</a>
<div id="email_page_count"><r:email_page:count/></div>

Create a page of type Email with a body part like this:

<r:email_page:form [subject="Recommendation"]>
  <r:error>
    <div id="email_page_errors">
      <h4>Please correct the errors below.</h4>
      <ul>
        <r:error on="from"><li>Your email address <r:message /></li></r:error>
        <r:error on="recipients"><li>The recipient email address <r:message /></li></r:error>
      </ul>
    </div>
  </r:error>

  <h3><r:page_title/></h3>

  <div class="field<r:error on="from"> error</r:error>">
    <label for="from">From:</label>
    <r:text name="from"/>
  </div>
  <div class="field<r:error on="recipients"> error</r:error>">
    <label for="recipients">Recipients:</label>
    <r:text name="recipients"/>
  </div>
  <input type="submit">
</r:email_page:form>

Optionally customize the email by adding an email or email_html part to the Email page like this:

<r:email_page>
<r:from/> enjoyed reading this page <r:page_url/> and thinks you might too.
</r:email_page>

TODO

  • display friendly error message if there is no page of type Email

  • handle finding multiple “Email” type pages

Home

http://github.com/mikehale/radiant-email-page-extension/tree/master

Credits

Sponsored by Ignite Social Media LLC - ignitesocialmedia.com/ Heavily influenced by Mailer Extension for Radiant (there is probably a way to refactor this extension to make use of it).

See LICENSE for copyright and licensing details.

Something went wrong with that request. Please try again.