> s it possible to capture query parameters and use them inside tags? > For example if I have a URL like this > http://www.mysite.com/books?lang=it can I caputre the lang > parameter and > pass it to some tags? > Having a page made with to parts "it" and "eng" I could decide wiche > part show in a way like this: > <r:content part="LANG" /> where lang is the url parameter captured. > But this could be useful in many other situations I think. > Thanks to everybody > Francesco Lunelli
If you're willing to get down and dirty and write and extension, I've had some thoughts on how to implement a better langauge extension - the different trees provided by the language redirection extension don't strike me as particularily friendly to keep up to date, and your suggestion is pretty close to what I've got in my head. Basically, there would be a parent 'language selector' page, all children below that point can have differently languaged parts. When the parent page's find_by_url method is called, it sets LanguagePage.language = 'en' (not 100% sure on the best mechanism, but that'll do off the top of my head) When children are asked for a page part, say 'body', they would first look for 'body_en' and only revert to 'body' if that does not exist. So you'd have a single tree of pages, but they would be served through different urls: /en/books /de/books /fr/books I've got no real use for international stuff in the forseeable future as I run a local site for local people, so I don't think I can be bothered actually writing the code to do this, but I've got it all pretty much in my head if anybody wants some further detail to pursue it themselves or some monetary motivation for me to write it. Dan. _______________________________________________ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant