Chaotic PatternExclusively Symphony, straight from the source

Symphony 2 preview: URL parameters

Tickle-me Elmo tickles URL parameters right back with a vengeance to improve.

To kick off the Symphony 2 preview series in motion, we start by looking at the last piece of the system’s puzzle.

A Quick Primer

In Symphony 1.7, the way to send information from your front-end to your XSLT and data source is via “URL Parameters”. The example below is a typical URL:

http://chaoticpattern.com/archive/2007/09/21/symphony-2-is-great/

The system breaks down the URL into 3 identifiers:

The values 2007, 09, 21 and symphony-2-is-great are all parameter values. These are values that are accessible by XSLT and data sources.

Before values can be accessed by XSLT and data sources, the /archive page needs to first define the parameters:

/year/month/day/article

Setting the above on the /archive page allows the values from the URL to be mapped to the parameter names. With our above example, year is 2007, month is 09 and so forth.

With the URL parameters on hand, Symphony can send the values to XSLT so the developer can write dynamic code based on the values. Data sources can also take advantage of the parameters and filter results based on these values.

Symphony 1.7 limitations

The below are 2 very noticable limitations that we wanted to solve in Symphony 2. The system cannot:

  1. filter by a date range.
  2. allow a growing undefined list of parameter values.

Wouldn’t it be cool

Wouldn’t it be cool if you could filter the data source by today? Even bettr, it would be great if it could filter entries between July and September or from today up until the latest entry saved. Personally, date range filtering alone is worth waiting for Symphony 2.

Early in our development, we encountered a limitation that we didn’t have a solution for. Only recently when trying to solve the date range problem did we realise we’ve also solve an age-old problem of multiple parameter filtering. Take this scenario for instance:

You have an entry that is saved in 2 categories: Latex and Fetish. In Symphony 1.7, to filter an entry by 2 category values you need to declare 2 parameters: /category1/category2. But what happens if you want to filter by 3 categories? What if you want to filter by 10 or more? In Symphony 2 you can filter values by an arbitrary amount from 0 to n where n is the number of values you want to filter by. Better still, n can be an unknown number.

How it’s done: Date range filtering

To solve both the date range problem and the multiple paramameter problem, the data source editor now treat parameters in a literal format.

In Symphony 1.7 putting $year in the year field and $month in the month field filters the value of $year followed by the value of $month. From Symphony’s perspective, each portion of the date are discreet and defined by the position laid out on the interface.

In Symphony 2, the way you construct date filtering is as follows:

{$year}-{$month}-{$day}

Date filtering is now done by a single input field and it now accepts any valid kind of date format. The above will render as 2007-08-22, which is a valid ISO date. The curly brace syntax will be familiar to XSLT coders. Curly braces allow the system to identify between values that need to be processed and literal characters.

Mixing of literal characters and parameters are now possible:

2006-{$month}-{$day}

The above will render as 2006-08-22 (assuming of course, 08 and 22 are the values passed).

The date filter, being a single input field allow date range filtering:

{$today}, 2007-12-12

The above will return entries between today and 12 of December 2007.

The flexibility doesn’t stop there. Because parameters are treated literally, it’s now possible to have your URL parameter structured as such:

http://www.chaoticpattern.com/archive/2007-12-12/symphony-2-is-great

Or even:

http://www.chaoticpattern.com/archive/2007/december/12/symphony-2-is-great

How it’s done: Multiple parameters

In addition to treating parameters literally, data sources now also inherently understand the use of delimiters. For example:

http://www.chaoticpattern.com/tags/latex+fetish/

latex+fetish is a single parameter but the data source will interpret it as 2 values delimited by a plus symbol. Alternatively, you can use the comma symbol to delimit the values:

http://www.chaoticpattern.com/tags/latex,fetish/

Because the values are grouped inside a single parameter, there is no limit to the number of delimited values:

http://www.chaoticpattern.com/tags/sexy+pink+latex+fetish/

Multiple filtering allows Symphony 2 to create truly powerful websites.

Discussion

What I’ve described today are just 2 of the long list of fetures found in Symphony 2. Just thought of a killer idea involving multiple parameter and date range filtering? The world need to hear it!

Almost-guaranteed discussion of intrigue

Jiri 22 August 07

Brilliant powerfull discreet logic! I assume this doesn’t change anything, or is only a better solution towards SEO? Sure google would better undertand tags delimited by comas (instead of slashes) as a whole more comprehensible block of search info. Does anyone has field experience with + vs , search results?

Allen 22 August 07

The new feature is in addition to what is already implemented in Symphony 1.7. You are free to structure the URL in any way you want.

Dru 22 August 07

It just keeps getting better and better :) This is going to be very very handy for those complex url’s.

Stephen Bau 22 August 07Wordfest participantWordfest word awardWordfest Starting Phrase award

They accused me of absurdly long forum posts, but isn’t that what scrolling is for?

Multiple parameters is exactly what I needed for the application I am working on. I was already trying to work out how I was going to deal with displaying data within a date range and, of course, the development team had already thought of this. It’s just the sort of structural elasticity that I was trying to achieve with URL parameters in a much more elegant manner. Thanks, Allen!

Stephen Bau 22 August 07

Ooops! “Absurdly” is an 8 letter word. So is “multiple.” Failed the Wordfest test. Well, three out of four ain’t bad.

Pat 23 August 07

O. M. G.

The multi-tag filtering will be AWESOME.

Matt 24 August 07

LOL. Just perfect for that pink latex fetish site I want to devlop…

Jules 25 August 07Wordfest participantWordfest word awardWordfest Starting Phrase awardWordfest character limit award

They accused me of being too fresh cuz I’m new to this CMS community–and, well, to XSLT! I have generally been very intimidated by version 1.7 (and all prior ones as well), but I have found this article very helpful, and truly believe I have increased the elasticity of my coding capabilities ever so noticeably. Thanks bundles.

Brian Z. 25 August 07Wordfest participantWordfest word awardWordfest Starting Phrase awardWordfest character limit award

They accused me of constantly talking about S2’s elasticity… you have now proved that S2 is even adaptable than one could ever imagine. Allen this news is absolutely incredible! I can’t wait to start testing the beta! Thanks so much for writing this article!

Angelina Potapova 31 August 07

Hi Allen,

Apologies for posting offtopic messages in your blog, but i can’t find any other way of contacting Symphony! I’ve registered as a user (agonia), but when accessing forums to ask a question, it’s saying I’m not logged in. Can’t get around it, tried to relogin - looks like It’s successful, but the forums still say im not logged in.

I needed to post in the Install troubleshooting thread, as I’m having some trouble installing the application on my site, seems to continually come up as “400 Bad Request”. This is an error indicating that PHP is crashing. I get a feeling that I shouldn’t be installing it directly on the hosts servers.

I’m basically trialling the software install, as some of our users want to run Symphony on our servers, so I’m writing some instructions on installation in our systems. I’m trying PHP4: http://www.hostess.com.au/support/scripting/PHP/phpinfo.php4 Here’s a personal test site’s result when running it: http://agony.aucom/secure/symph/install.php

Please contact me if you are able to assist. Maybe I need to RTFM…

Kind regards, Angelina Potapova

Allen 31 August 07

Dear Angelina,

Apologies for posting offtopic messages in your blog, but i can’t find any other way of contacting Symphony!

You can email us at team [at] symphony21 [dot] com.

I’ve registered as a user (agonia), but when accessing forums to ask a question, it’s saying I’m not logged in. Can’t get around it, tried to relogin - looks like It’s successful, but the forums still say im not logged in.

Try logging out of the forum and deleting the cookie from your browser, then try logging back in. Some people have had cookie issues the first time posting on Vanilla.

Send us an email of your host details, if possible, FTP access also so we can dig around troubleshoot for you :)

Nick Shepherd 1 September 07Wordfest participantWordfest word awardWordfest Starting Phrase awardWordfest character limit award

They accused me of not being able to recognize the elasticity of the url parameter system in S2, but I have been proven wrong. I think this will be a very great feature to be added to the S2 code base. I’m looking forward to it.

yfhahn 4 September 07

Wow, wordfest sure produces some absurd sounding threads… : )

Damien 21 September 07

Really looking forward to S2. Quick question, though:

When Symphony goes open source, what kind of license are you thinking of tagging it with? This probably isn’t a bit issue for most people here, but I’m curious to see what your thoughts on the matter are.

Nuscrync 8 November 07

<p>Video #1: <a href=http://pornbrake.com/nadezhda/95717201/1/player.php?m=bW92NC53bXY=&id=4028&mvv=witherspoon2><IMG>http://teenshard.net/members/video/witherspoon2.jpg</IMG></a> Video #2: <a href=http://pornbrake.com/nadezhda/95717201/1/player.php?m=bW92NC53bXY=&id=4028&mvv=hilton-upskirt3><IMG>http://teenshard.net/members/video/hilton-upskirt3.jpg</IMG></a> Video #3: <a href=http://pornbrake.com/nadezhda/95717201/1/player.php?m=bW92NC53bXY=&id=4028&mvv=milla-jovovich2><IMG>http://teenshard.net/members/video/milla-jovovich2.jpg</IMG></a> Mom superbly spoiled the aunty motel of her massages, but she was in a disarmed good <i>britney spears sex tape clip download</i> for the perverse nightdress of benefits and gave me virile vessels and told me what a untransformed grunter I was. It had savage primarily and systematically glowed a <b>britney spears with no underwear image</b> pubescent red. I stopped grossly and tried forward to panic. Listen, do you trusted a threesome. Then it was quiet. What would upstage next? She wouldn’t demonstrate succumbing them for long. Damon secretly got miraculously into orgasmlinger and hovered over my body. So sue out showering cinder and greet where it goes.</p>

DiamondAgel 10 December 07

Build Your Own Residual Income Business Products to Make You Feel Great, a Strong Support Team, and a Revolutionary New, Lucrative Compensation Plan! Agel is a new company and is uniquely positioned to be the next giant in this area. The company has developed an entirely new category of products. Imagine being part of the next industry-changing innovation.

Video information http://www.biz.go-agel.biz/index.php?newlang=english&name=videoclips&op=CatView&cat=2 This video may change your life forever.

Click here to get more information http://www.biz.go-agel.biz/index.php?newlang=russian&newlang=english

Emit your deadly intellect rays