How It Works :
Lets break down the following code:
~[if.~([01]schoolid)=1002]
<a href="mailto:person1@school.org,person2@school.org,person3@school.org
?subject=New Student at the middle school
&body=Last Name: ~(last_name)
%0AFirst Name: ~(first_name)
%0AStudent Number: ~(student_number)
%0AGrade: ~(grade_level)
%0AHome Room: ~(home_room)">
Send New Student Email</a>
[/if]
This example code would be used inside a student page. When clicked it would generate an email to persons one two and three with the subject "New student at the middle school" and a handful of student information in the body.
The link is wrapped inside the ~[if.~([01]schoolid)=1002] tag so it will only show up if the current school your in has the ID 1002. This allows you to format the email link differently by school simply by repeating the entire code for each school ID.
The next line starting with "<a href" is just your typical mailto tag with each email address separated by a comma. "?subject=" is where the subject of the email starts. Finally the body of the email is defined after "&body=". The "%0A" preceding each line in the body inserts a line break (actually, I found this will not work with every email client, some will just ignore the breaks).
I'm sure there are a bunch of interesting uses for email links in PS. I would love to hear how people use them...
|