# File lib/cgikit/elements/link.rb, line 56
  def append_to_response( response, context )
    take_value(:name)
    take_bool(:enabled)
    take_bool(:escape)
    take_value(:href)
    take_value(:page)
    take_value(:action, false)
    take_value(:string)
    take_bool(:secure)
    take_value(:query)
    take_value(:session_id)
    take_value(:direct_action, false)
    take_value(:action_class)

    if @values[:string] then
      @values[:string] = escaped_string(@values[:string], @values[:escape])
    end

    unless @values[:enabled] then
      if @values[:string] then
        response.content << @values[:string]
      elsif empty? == false then
        @node.append_to_response(response, context)
      end
      return
    end

    take_value_for_query_from_attributes
    if @values[:page] or @values[:action] then
      # create session if it doesn't have session
      context.session
      url = context.component_action_url(@values[:query], @values[:secure])
    elsif direct_action? then
      url = context.direct_action_url(@values[:action_class],
                                      @values[:direct_action],
                                      @values[:query],
                                      @values[:session_id])
    end

    html = '<a'
    if @values[:href] then
      html << " href=\"#{@values[:href]}\""
    else
      html << " href=\"#{url}\""
    end
    html << other()
    html << '>'

    response.content << html
    if empty? == false then
      @node.append_to_response(response, context)
    elsif @values[:string] then
      response.content << @values[:string]
    end

    response.content << '</a>'
  end