|
How the Blogger Template Converter Works
WebCrimson can create a wide variety of sites, one of which is known as a Weblog.
The company that popularized Weblogs (Blogger) has created a proprietary templating language called Blogger Tags. We've created a Template Converter which converts those proprietary tags into the industry-standarad templating language, XSLT.
Go inside any template, and you should see a link which says, "Have a Blogger template? Import it here!". Click on that, paste in your Blogger Template, and hit Save. WebCrimson will automatically convert your Blogger template into XSLT!
If you're wondering exactly how the Blogger Tags map onto XSLT, here are the substitutions we make:
1. First, we see if you are using the Tag called BlogDateHeader. If so, then that means that you are grouping posts by the date. That means we have to insert two loops into the XSLT code. In order to do that, we make the following substitutions:
| Blogger Tag | WebCrimson Tag |
| <BlogDateHeader> | <xsl:for-each select="$index"> |
| <$BlogDateHeaderDate$> | <xsl:value-of select="."/> |
| </BlogDateHeader> | <xsl:for-each select="//Weblogs[Publication_Header_Date=current()]"> |
| </Blogger> | </xsl:for-each></xsl:for-each> |
2. If you're not using the BlogDateHeader tag, then we only need to insert one loop into the XSLT code:
| Blogger Tag | WebCrimson Tag |
| <Blogger> | <xsl:for-each select="root/Weblogs"> |
| </Blogger> | </xsl:for-each> |
3. Now that we've put in the XSLT loops, we can go ahead and replace all the proprietary Blogger tags with XSLT tags:
| Blogger Tag | WebCrimson Tag |
| <$BlogItemBody$> | <xsl:value-of disable-output-escaping="yes" select="Entry"/> |
| <$BlogItemAuthor$> | <xsl:value-of select="Users/Username"/> |
| <$BlogItemAuthorEmail$> | <xsl:value-of select="Users/UserEmail"/> |
| <$BlogItemDateTime$> | <xsl:value-of select="Publication_Formatted_Date"/> |
| <$BlogItemArchiveFileName$>%23<$BlogItemNumber$> | <xsl:value-of select="Perma_Link"/> |
| <$BlogItemArchiveFileName$>#<$BlogItemNumber$> | <xsl:value-of select="Perma_Link"/> |
| <$BlogItemNumber$> | <xsl:value-of select="UniqueID"/> |
That's all there is to it! Enjoy your new XSLT-compatible WebCrimson template!
|