similar to: Adding Custom templates?

Displaying 20 results from an estimated 3000 matches similar to: "Adding Custom templates?"

2006 Mar 03
17
RCSS problems
Hi List! Following http://rcss.rubyforge.org/files/README.html, I''m trying to get RCSS to work with Rails. The rcss command itself works fine, but when trying to access http://localhost:3000/rcss/test.css I always get "Unknown action - No action responded to test.css", which I don''t understand since the route and controller are in place. Anyway, hopefully this is
2006 Mar 23
5
Dirt simple .rcss templates
There was some discussion on this list recently about doing .rcss templates in Rails using a custom template handler. I''ve come up with a very simple way to support rcss without a handler. Turns out all it takes is a route and an action that calls render(:file...). I put a full write-up on my blog earlier today:
2006 Mar 01
1
Using delegate templates
Ok, it looks like what I need to do is use a delegate template, but I can''t find anything anywhere online. Has anyone ever used this feature before and could possibly explain it to me please? -- Topher Fangio fangiotophia@gmail.com http://www.fangiotophia.com Website Specialist Fangiotophia Designs (325) 660-7141
2006 Apr 13
2
Content-type on render :file
Hi all, I''ve just been trying out the dirt-simple rcss scheme posted here: http://blog.hasmanythrough.com/articles/2006/03/23/dirt-simple-rcss-templates It looks like the content-type declaration on the line: render :file => file_name, :content_type => ''text/css'' isn''t getting honoured. I had to add a separate:
2006 Aug 03
1
Using instance variables in CSS
What suggestions do you guys have for using instance variables in CSS? I suppose I could just include a partial with style tags, but I''m looking for something a little more elegant. I found this: http://rcss.rubyforge.org/ Has anyone used it? -- Posted via http://www.ruby-forum.com/.
2006 Jul 14
3
css in builder
Hello, I''m reading the builder project API (http://builder.rubyforge.org/), but I don''t find the answer to my question: Wich is the file name for CSS templates? (like RXML to XML). -- Daniel H
2006 Aug 09
2
[Markaby] sub-templates?
Has anybody figured out how to do sub-templates in Markaby? Thanks, Joe -- Posted via http://www.ruby-forum.com/.
2006 Jul 17
6
Has markaby been abandoned?
Recently discovered Markaby. Before I use it on a production system, I''d like to know if it is still being maintained? According to the change log, the last change was in February of 2006. Does this mean that the project has been abandoned? Or, at version 0.3 it was considered production stable and complete? -- Best Regards, -Larry "Work, work, work...there is no satisfactory
2006 Sep 10
11
Using partials with Markaby
I''m trying to use a partial from within Markaby. I haven''t been able to figure out how to access a parameter passed into the partial. Here''s the code I''m using: h1 "Create a new note" if @note render :partial => ''form/errors'', :record => @note end ... (that snippet, as well as the partial is stolen shamelessly from Restolog
2006 Aug 02
7
form_for not working with Markaby
I''m playing around with Markaby and I decided to write a little blog app. I''m running into issues with forms however. If I use form_for the output of the form gets swallowed. For example: form_for :article, @article do |f| f.text_field :title f.check_box :published f.text_area :description f.text_field :pub_date f.text_area :content end gets rendered as an empty form
2006 Jun 04
1
Image links in stylesheets?
Guys, I understand the logic behind using image_tag in rhtml to maintain app portability, but how do you link to images in a stylesheet maintaining that same portability? Thanks for your help! B.A. -- B.A. Baracus: I thought you weren''t crazy no more? Murdock: Only on paper. -- Posted with http://DevLists.com. Sign up and save your mailbox.
2006 Apr 02
6
Neat style trick
Not terribly exciting, but I was happy to think of it. I needed a div with a fixed height that could vary depending on page content. So I did this: <div class="listcntnr" style="height: <%= @users.size / 2 * 125%>px"> Whee! --Al Evans -- Posted via http://www.ruby-forum.com/.
2005 Oct 18
1
Rcss - first public release
Hi All! My first contribution to Ruby/Rails community is ready. Here is short snippet from README as an overview: Rcss implements CSS-SSC (Server-side Constants) in Ruby. Main features: * Create rich CSS files using: - ERB templates - Server-side constants - Server-side classes (preliminary) * Simply add Rcss files to any Rails application * Process Rcss files off-line using command
2006 Jan 22
2
Using register_template_handler to serve CSS files (Making ActionView handle .css as .rhtml)
Hi, I wanted to be able to use some Rails code inside CSS files, so I set up a controller (StylesController) to serve CSS files that reside inside the controller''s view folder when the browser requests /stylesheets/:action So in the controller I just define empty actions with the names I want my style sheets in (ie: def cooleffects end - that would respond to
2007 Aug 21
1
Render template not matching absolute path
Hi I have a simple controller method like this: class StylesheetsController < ApplicationController layout nil session :off def gap site = Site.find_by_hostname(request.host) @colours = site.colours respond_to do |accepts| accepts.css { render :file => "#{RAILS_ROOT}/app/views/ stylesheets/gap.rcss" } end end end And I want to test that
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other than Erubis are not loaded automatically (Haml, XMLBuilder). Either this should be fixed, or the documentation should be updated to instruct people how to use non-Erb template engines. Apparently the solution is to do something like this in merb_init.rb: ::Merb::AbstractController.register_engine
2006 Mar 02
3
plugin versioning
When I install a plugin, does Rails record the version installed anywhere? Maybe I''m not doing it the "right" way, but I''ve excluded vendors from my source repository. I''d like some ''record'' of what plugins are used that is under source control. David
2007 Nov 06
5
textarea fails on rows attribute
Hi, Camping 1.5.180 Ruby 1.8.6 It looks like Camping is choking on the ''rows'' attribute for input tags: input(:name => ''cuid'', :type => ''text'', :size => 10, :rows => 3) That will fail with: Markaby::InvalidXhtmlError no attribute `rows'' on input elements:
2006 Apr 25
5
markaby or erb?
Guys, We''re embarking on a new dev project, and I''m curious....why would one choose markaby over erb? I for one am no fan of the erb syntax, but aside from that it''s similar to other technologies I''ve used in the past: PHP, JSP, ASP, etc. Why would one choose markaby over erb? What are the benefits? What are the drawbacks? Is there anything remarkable
2007 Jul 11
4
Extending Markaby for SVG
Hi all, I love the elegance of Markaby for HTML generation. I''d like to do something similar for SVG, e.g.: svg11 do title "Slide Title" rect({:x=>2,:y=>2,:width=>508,:height=>318,:fill=>"aqua"}) g({:style=>"fill:blue; stroke:black", :transform=>"translate(17,-38)"}) do circle({:cx=>70, :cy=>100,