From c7fc7084d55985687805e6cd11dbd51cfeb3afa6 Mon Sep 17 00:00:00 2001 From: chris2tof Date: Wed, 1 Jun 2011 15:49:21 +0800 Subject: [PATCH] Tag 'link' --- lib/parser.rb | 16 ++++++++++++++++ lib/template/nav.snippet | 28 +++------------------------- 2 files changed, 19 insertions(+), 25 deletions(-) diff --git a/lib/parser.rb b/lib/parser.rb index 41f8e296b..51580e48b 100644 --- a/lib/parser.rb +++ b/lib/parser.rb @@ -80,6 +80,13 @@ module Parser ret << tag.expand ret << '' end + c.define_tag 'link' do |tag| + item = Item.first(:conditions => { :full_name => tag.attr['name'] }) + ret = '' + ret << "" + ret << item.i18n_variable[I18n.locale] + ret << '' + end end end @@ -165,6 +172,15 @@ module Parser ret << tag.expand ret << '' end + c.define_tag 'link' do |tag| + item = Item.first(:conditions => { :full_name => tag.attr['name'] }) + ret = '' + ret << "" + ret << item.i18n_variable[I18n.locale] + ret << "" + end end end diff --git a/lib/template/nav.snippet b/lib/template/nav.snippet index c47d664b5..14766176e 100644 --- a/lib/template/nav.snippet +++ b/lib/template/nav.snippet @@ -1,27 +1,5 @@