Hi,
I am writing some conditionals based upon the contents of different segments of the URL. I used the example in the documentation as a starting point but it doesn’t appear to be working. Regardless of whether there is a segment_2 in the URL or not it is still thinks there is.
The am using the following code at the top of my template
{if segment_2}
{assign_variable:selected_year="{segment_2}"}
{if:else}
{assign_variable:selected_year="No year supplied"}
{/if}Testing this with the URL’s http://www.mysite.com/template/ and www.mysite.com/template/2008. In both cases it assigns either 2008 or am empty string to the select_year variable. In the first example I would expect it to drop into the else case and assign “No year supplied”
Has anybody else had problems like this?
Cheers
Giles