Skip to content

Instantly share code, notes, and snippets.

@lukaszkorecki
Created January 8, 2010 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaszkorecki/272164 to your computer and use it in GitHub Desktop.
Save lukaszkorecki/272164 to your computer and use it in GitHub Desktop.
<p>WaplHelper examples - check out the test file for more</p>
<%= chars('dupa') %>
<%= chars('[b]elo[/b]',{ :attributes =>{ 'make_safe'=>'false' }, :cell=>{ "class" => "test"}, :row=>{:id=>'duzy'}}) %>
<%= chars('[b]elo[/b]',{ :attributes =>{ 'make_safe'=>'false' }}) %>
<%= external_image('http://wapl.info/img/header_wapple.png') %>
<%= external_image('http://wapl.info/img/header_wapple.png', { :attributes=>{ :file_type => "png", :scale =>"150"} }) %>
<%= external_image('http://wapl.info/img/header_wapple.png' , { :children => { :safe_mode => "1"}}) %>
<%= external_image('http://wapl.info/img/header_wapple.png') %>
<%= external_link("Google", 'http://google.com') %>
<%= external_link("Google", "http://google.com", { :attributes => { :id => "wgp"}, :image => { :url => "http://wapl.info/img/header_wapple.png"}} ) %>
<%= external_link("Google", "http://google.com", { :attributes => { :id => "woop"} }) %>
<!-- one can also use the base methods -->
<% ch = tag('chars', tag('value', "TEST")) %>
<%= row_cell(ch) %>
<?xml version="1.0" encoding="UTF-8" ?>
<%= start_wapl %>
<!-- it ain't pretty but but you can use other helper methods and stuff -->
<head>
<%= title('my awesome title')%>
<%= css('http://coffeesounds.com/style.css') %>
<%= meta({:author=>"luuuuuu"}) %>
</head>
<layout>
<%= yield %>
</layout>
<%= end_wapl %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment