Sha256: 52af01a734ad297209d72ed1e1b0732fce372cf2dae46580c6e6d5c737761992

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

# frozen_string_literal: true

# Makes content available for editing, basically adds the right attributes
#
# == Basic usage:
#    <div {%editable%} data-editable-id='fiets'></div>
#
class EditableUrlTag < LiquidumTag
  def render(context)
    super

    content = context.registers['content']

    # FIXME: Use url helpers
    %[/scribo/sites/#{content.site.id}/contents/#{content.id}/parts]
  end
end

Liquid::Template.register_tag('editable_url', EditableUrlTag)

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scribo-1.0.38 lib/scribo/liquid/tags/editable_url_tag.rb