Class: Alula::LinkToTag
- Defined in:
- lib/alula/core_ext/tags/link_to.rb
Instance Attribute Summary
Attributes included from LiquidExt
Instance Method Summary collapse
Methods included from LiquidExt
included, #initialize, #render
Instance Method Details
#content ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/alula/core_ext/tags/link_to.rb', line 3 def content target = if ["href"] ["href"] elsif ["slug"] item = @context.site.content.by_slug(["slug"]) item.nil? ? "" : item.url end @context.link_to(["source"], target) end |