liquid

Problem with regexp trailing space

Hello guys I'm currently modifying Liquid Framework (http://github.com/tobi/liquid) in order to make it support literals. It's all nice and cool but I'm having a slight problem with the regexp I'm using. The following works great, except the fact that it captures the trailing space in $1 "{{{gnomeslab }}}" =~ /^(?:{{{\s?)(.*)(?:}}})$/...

Overlapping divs in liquid layout - CSS

So here's my problem. I am using a liquid layout on my page, so that the site always fits the width of the window. works perfectly, sounds great, right? the problem that i'm having is that whenever the window is resized, the divs start moving, overlapping, and wrapping to the next line. here's my site, so you can see what i am talking...

Passing variables to model instance methods in Liquid templates

I've been playing around with the Liquid templating engine this weekend, and I wonder if the following is possible. Say I have a latest_posts method in a Blog model, which I can pass an integer to to get the latest N posts. Is it possible to use that method in a liquid template? For example: class Blog has_many :posts def latest...

Does python have a safe, user editable script markup for templates like RoR's liquid?

I'm looking for a templating language, that end users can safely edit to customize their html/theme of a web application. Something to how http://www.liquidmarkup.org/ works. ...

Ruby Liquid templating nested hashes

I have a nested hash: { :KeyA => { :KeyB => "hello", :KeyC => { :KeyD => "foo", :KeyE => "bar" } } } if I pass this to ERB I can do: <%= config[:KeyA][:KeyC][:KeyD] %> and get: foo However this doesnt work with Liquid :( If I do:...

How to pass parameteres to liquid methods?

I would like to pass collection of photos to the template and allow the user to select which picture she wants to display. What would be resonable implementation to do this? The best way to select a picture would be by ID, but the user can only access his own pictures in this scenario. Is the custom tag the only way to do this sort of th...

Ruby/Rails: Is it possible to execute a default method when calling an instance (@instance == @instance.all IF "all" is the default method)?

I understand my question is a bit vague but I don't know how else to describe it. I've asked in numerous places and no one seems to understand why I want to do this. But please bear with me, and I'll explain why I want something like this. I'm using Liquid Templates to allow users to make some dynamic pages on my site. And for those tha...

Rails and translations in liquid based themes...

I would like to return a string from a model, which can be used directly in the liquid-based template. The problem is, that I would like the string to be translated using gettext. I cannot use _("string") right into model.to_liquid, because it doesn't work. As far as I understand, the model is loaded once, and it will always return the...

How do I make the background parameter of the object tag liquid?

Hi all. I am inserting a silverlight application into my aspx page. I am using the object tag which is the recommended method. The website has a liquid layout. I have figured out how to get the SL Application to resize when the browser resizes. The problem is that the background of the plug in container () does not resize. This c...