Say Hello to Two New Tags
- Published
- about 10 months ago
- by
- with
- 0 Comments
We just added two new tags to our templates that come in handy when you have scripts or stylesheets you want to include only for the live version of your page or only for our private development version.

Meet <pop:production> and <pop:development>
When working on a Webpop project you can always access it on the web in two different ways, represented by two links in the header.
One is the preview link that will take you to the version of the site you are currently working on.
The other is the live link that will always take you to the public site at the current domain of the website.
The two new tags makes it easy to make sure that certain scripts or stylesheets only gets included on one of these urls.
The perhaps most typical example is making sure you only include the code for Google Analytics when people are seeing the live version of your site. Now you can do this with the <pop:production> tag:
<pop:production>
<script>//Analytics stuff goes here</script>
</pop:production>
Anything you put inside a <pop:production> tag will only show up on the live url.
The opposite goes for the <pop:development> tag. This is handy when including a debugging CSS for your grid, the YUI profiling tools or other similar assets that you only want to load during development of your site.