Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion I dream of a better template system
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Weston Platter  
View profile  
 More options Sep 11 2012, 4:38 pm
From: Weston Platter <westonplat...@gmail.com>
Date: Tue, 11 Sep 2012 13:38:00 -0700 (PDT)
Subject: Re: [spree-user] I dream of a better template system

@Pepper - the same type of functionality can be achived through Controller
and View (ERB) code. How you implemented this? If yes, how would you want
to change it to be more like Forward?

Forward combines the Controller and View functionality together. Thus
making it easier in some senes, but it may make more complex actions
difficult. Why I think this. http://getfwd.com/

{get $products from "/products" [search => $params.query]}

Here's how I would do this with Spree // Rails // ERB

# products_controller.rb
SimpleProducts < ApplicationController
  def show
    @products = Spree::Product.all

    render_to do |format|
      format.html
      format.json { render json: @products}
    end
  end
end

# app/views/simple_products/show.html.erb
<% @products.each do |p| %>
  <%= p.name %>
<% end %>

On Tuesday, September 11, 2012 3:20:07 AM UTC-4, Peter Berkenbosch wrote:

> We have a thing called erb?

> But, for real.. what you want can be done with erb templates, and deface..
> very very easy even.. you can override a complete template with deface..and
> use erb for that..

> On Sep 9, 2012, at 7:47 AM, Pepper <zee....@gmail.com <javascript:>>
> wrote:

> Hi Spree devs, please take a look what Forward is doing:
> http://getfwd.com/. That template system is exactly what we need -
> similar to liquid but with much richer syntax. The current deface approach
> is quick to get a store up and running, but it becomes useless once we
> start doing more customization. We need something like liquid but better.
> Please take a good long look at Forward, because that's exactly what we
> need. Thanks!

> --
> You received this message because you are subscribed to the Google Groups
> "Spree" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spree-user/-/9Mue6BBSAyUJ.
> To post to this group, send email to spree...@googlegroups.com<javascript:>
> .
> To unsubscribe from this group, send email to
> spree-user+...@googlegroups.com <javascript:>.
> For more options, visit this group at
> http://groups.google.com/group/spree-user?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.