RT @scalzi: Spent the day perfecting the lost art of whistling while breathing in. Now I NEVER HAVE TO STOP WHISTLING #WifeWillSoonMurderMe
Entries for #if
← first ← previous page 4 of 4
Code is polished enough to push and call done. Estimates for more work await. Nevermind the aggravation, I call life Good #indylife
Ques. for web freelancers: do you accept Paypal, and if so, how do you handle Paypal's surcharge #thelifeindie
one benefit of working for myself in 2011: getting to be a 'full peer" again, no more working inside the VPN #indielife
Love the scifi motif in Firefox's update pages. http://flic.kr/p/8SM8MT anyone know the artist #firefox #scifi #illustration
Text Resources and Post Formatting
I recently found a solution to a problem that had been bugging me for some time.
Conversant has this really cool email gateway - all posts to this site go out to anyone who is subscribed to the site and has the list feature turned on.
So, when I write a post like this one, the post goes out over email, and the <blockquote> tags are stripped. How do my subscribers know where the quote is?
To the rescue: Conversant's text resources. A resource is like a Manila/Radio shortcut: it's a defined piece of text that gets replaced with something else when the content gets rendered. Resources are most often used for links and images, but Conversant has a powerful resource type called a Text Resource.
A text resource can have anything in it - html, text, and Conversant template macros. So I essentially write my own no-arg macro called'quote':
<-#if condition="ioInterface'email'"--> ----- quote --<-#else--><blockquote><-#endif-->
If the post is being rendered for email, it inserts the "----quote----" text, otherwise it renders the blockquote tag. A partner resource called'endquote' inserts "------" or the closing blockquote tag.
Now, when excerpting text, I start the excerpt with |quote| and close it with |endquote|, and it gets rendered legibly both on the site and in the list email.
← first ← previous page 4 of 4