Class: Juli::Macro::Amazon
- Inherits:
-
TemplateBase
- Object
- Base
- TemplateBase
- Juli::Macro::Amazon
- Defined in:
- lib/juli/macro/amazon.rb
Overview
generate Amazon link
Amazon link template can be defined at ‘amazon’ entry in JULI_REPO/.juli/config.
if it is not defined, then default template here is used.
Constant Summary collapse
- DEFAULT_TEMPLATE =
" <iframe src=\"http://rcm-jp.amazon.co.jp/e/cm?t=wells00-22&o=9&p=8&l=as1&asins=%{asins}&ref=tf_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr\"\n style=\"float:right; width:120px;height:240px;\"\n scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"\n ></iframe>\n"
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from TemplateBase
#conf_key, #run, #set_conf_default
Methods inherited from Base
#after_root, #initialize, #on_root, #run, #set_conf_default
Methods included from Util
#camelize, conf, find_template, in_filename, juli_repo, mkdir, out_filename, str_limit, str_trim, to_wikiname, underscore, usage, visitor, visitor_list
Constructor Details
This class inherits a constructor from Juli::Macro::Base
Class Method Details
.conf_template ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/juli/macro/amazon.rb', line 19 def self.conf_template "# Amazon association link with any ASIN can be rendered\n# at any location in juli text. Its template is as follows.\n# This HTML is just an example so that you can change as you like.\n# '%{asins}' in the template will be replaced by actual ASIN:\n#\n#amazon: '<iframe src=\"http://rcm-jp.amazon.co.jp/e/cm?o=9&p=8&l=as1&asins=%{asins}&ref=tf_til&fc1=000000&IS2=1<1=_blank&m=amazon&lc1=0000FF&bc1=000000&bg1=FFFFFF&f=ifr\" style=\"float:right; width:120px;height:240px;\" scrolling=\"no\" marginwidth=\"0\" marginheight=\"0\" frameborder=\"0\"></iframe>'\n" end |
Instance Method Details
#place_holder ⇒ Object
30 |
# File 'lib/juli/macro/amazon.rb', line 30 def place_holder; 'asins'; end |