Search

I have seen a few threads on this topic but none that I fully understand. So I’ll just tell you all what I need to do and hopefully someone can point me in the right direction.

http://modwaxdev.futurehat.com/candle/orange/

That’s an orange candle for sure. Check out how I made it:

http://modwaxdev.futurehat.com/image/3/130/130/5/cb6b22/uploads/modwax-thumb.png

Put whatever hex color you like in place of the cb6b22 and watch the candle change color. MAGIC!! Thanks to JIT. I’m sure I’m not the first person to have done that.

What I need is the ability to have 2 possible colors and 2 possible scents in the url. Example:

http://modwaxdev.futurehat.com/candle/orange/white/citrus/vanilla

Or something close to that. I could care less how I get those keywords in the url, I just know that I want them. I also want these params to pull from their respective data sets. So orange/white would pull from colors and citrus/vanilla would pull from scents and display pertinent info for each.

Don’t ask me how I’m going to do the multi-colored candle image… I’ll cross that bridge when I get there.

Anyway, if someone could point me in the right direction of a good thread on how to tell a S2 newb how to get to where I want to be.. it would be greatly appreciated.

Thanks.

Also, if this wets your appetite for candles.. check out http://modwax.com and make life smell better.

The candle trick is rather cool. I guess the magic will not be transparent to everyone at first sight. :-)

Those parameters are URL parameters. Define your URL params for the “candle” page (in the page admin), for example “color1/color2/scent1/scent2”.

Now those params – if set – will be available in the parameter pool (you may check this on your ?debug page).

If you append your datasources (colors and scents) to the page, you could do the rest in XSLT.

  1. The image: Write an XSLT template to build the image URL with encoded color values. Use the URL parameters to look up the color code in the “colors” XML.
  2. You can either pull the data from “scents” completely and do the filtering in XSLT. Or you can cretae two datsources, the first being filtered by {$scent1}, the second by {$scent2}. Then you have only data you really need in your XML, coming from two datasources.

I hope this helps.

I think I get it. I’m going to give it a shot tomorrow and see how it goes. Thanks!

Alright,

I got the suggested method to work (thanks much michael): /color1/color2/scent1/scent2

But I was doing some digging and I found this article:

http://chaoticpattern.com/article/symphony-2-preview-url-parameters/

I was wondering what I have to do to get it to work with something like:

/color1+color2/scent1+scent2/

It just makes more sense then having to put in /none/ when a candle has only one color.

It wasn’t clear to me from that blog post how to make that happen. I gather that I would just go down to the one DS for color and then it would somehow filter based on that delimiter. Is there a good video demo of this somewhere or could someone explain it to me in a few easy steps?

Thanks

I am rather sure that filtering should work with commas or plus signs – but this means different things.

Using a URL scheme like

/color1,color2/scent1,scent2/

you can filter the color datasource by color1 OR color2 and the scent datasource by scent1 OR scent2.

Using plus signs like in

/color1+color2/scent1+scent2/

means filtering the color datasource by color1 AND color2 and the scent datasource by scent1 AND scent2.

If you have a default installation of Symphony, you may try what I did:

  1. Switch the draft article to “online”
  2. Set your “articles” datasource to show two or more entries
  3. Go to “http://example.com/articles/a-primer-to-symphony-2s-default-theme,an-example-draft-article/” – you should see two articles now

Awesome. Great example and I have it working now.

For a while I was stuck on the fact that I can’t use + for “or”.

Is there any SEO penalty for having commas in the url? I could see some issues with CSV obviously if there was ever a need to use it there.

AFAIK, Google performs some sort of “plausibility check”, comparing the page title, the URL and the h1 headline. But:

  • the URL should be the least important part of this, and
  • I do not see any reason why search engines shouldn’t understand comma-separated values.

I never heard of any penalties connected to comma-separated values. Maybe you can do some research on the web (and post your results here). If you don’t find any articles about this, it would simply go for it.

http://www.blooberry.com/indexdot/html/topics/urlencoding.htm

Looks legit to me. My system is rockin now, I just have to figure out how to make that 2 colored candle :)

I am waiting for the two-colored candle.

:-)

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details