Public: renders the page content.

 options - The Hash containing the values to use inside the template.

 Returns: the rendered page content.
6651
def render_content(options={})
      layout = ::Liquid::Template.parse("{{content}}").render({"content" => page.content})
      result = ::Liquid::Template.parse(layout).render(optional_data(options), :registers => {:controller => controller}).html_safe
    rescue => e
      log_error(e)
    ensure
      return filter_images_urls(result.to_s)
    end
325660
def render(self):
        
        html = ''
        href = self.view if self.view is not None else self.href
        
        attrs = copy(self.attrs)
        if self.submodal:
            attrs['role'] = "button"
            attrs['data-toggle'] = "remote-submodal"
            if self.data_target:
                if isinstance(self.data_target, basestring):
                    attrs['data-target'] = self.data_target
                else:
                    attrs['data-target'] = "#submodal"
        elif self.modal:
            attrs['role'] = "button"
            #attrs['data-dismiss'] = "modal"
            attrs['data-toggle'] = "modal"
            #attrs['data-submodal'] = "true"
            #attrs['data-remoteinbody'] = "false"
            if self.data_target:
                if isinstance(self.data_target, basestring):
                    attrs['data-target'] = self.data_target
                else:
                    attrs['data-target'] = "#modal"
            
        if self.data_tip:
            attrs['data-tip'] = self.data_tip
        if self.target:
            attrs['target'] = self.target
        if 'css_class' not in attrs:
            attrs['css_class'] = ''
        attrs['css_class'] += ' btn ' + " ".join(self.css)
        attrs = ' '.join(['%s="%s"' % (key if key != 'css_class' else 'class', value) for key,value in attrs.iteritems()])
        
        if href:
            if self.view:
                href = reverse(self.view, args=self.view_args, kwargs=self.view_kwargs)
            if self.next:
                href += '?next=%s' % (self.next if self.next.startswith('/') else reverse(self.next))
            html += '<a href="%s" %s>' % (href, attrs)
        else:
            html += '<button type="button" %s>' % (attrs,)
        
        if hasattr(self.inner, 'render'):
            html += self.inner.render()
        else:
            html += self.inner
        
        if self.title:
            html += self.title
        
        if href:
            html += "</a>"
        else:
            html += "</button>"
        
        return html
620894
def options(self, request, *args, **kwargs):
        

        response = Response()

        response.headers['Allow'] = ', '.join(self.allowed_methods)
        response.headers['Content-Length'] = '0'

        return response
91563
def render(options)
      options = options_for_render(options)
      links = links_for_render(options)

      LinkCollection.new(context, links, options)
    end
794210
def options(self, request, *args, **kwargs):
        
        response = HttpResponse()
        response['Allow'] = ', '.join(self.allowed_methods)
        response['Content-Length'] = 0
        return response
49588
function (str, options, cb) {
    var ECT = this.engine;
    var tmpl = this.cache(options) || this.cache(options, new ECT({ root: { page: str }}));
    tmpl.render('page', options, cb);
  }
238987
def render
      # we do some normalization here
      status = normalize_status_code(@options[:status])

      base64 = normalized_base64_option(@options)

      headers = @options[:headers] || {}
      set_content_type!(status, headers)
      # x-jets-base64 to convert this Rack triplet to a API Gateway hash structure later
      headers["x-jets-base64"] = base64 ? 'yes' : 'no' # headers values must be Strings

      # Rails rendering does heavy lifting
      if drop_content_info?(status)
        body = StringIO.new
      else

        renderer = ActionController::Base.renderer.new(renderer_options)
        body = renderer.render(render_options)
        body = StringIO.new(body)
      end

      [status, headers, body] # triplet
    end
109695
def render_thumbnail_tag(document, image_options = {}, url_options = {})
      link_to image_tag(thumbnail_url(document)), url_for_document(document)
    end
183771
def append(self, page, content, **options):
        
        return self._dokuwiki.send('dokuwiki.appendPage', page, content, options)
965742
def render(self, name, value, attrs=None, renderer=None):
        
        context = self.get_context(name, value, attrs)
        return self._render(self.template_name, context, renderer)
864678
def render(document)
      document['content'].each_with_object([]) do |node, result|
        result << find_renderer(node).render(node)
      end.join("\n")
    end
742557
def render(template)
      template.render(config.variables.deep_merge(options[:globals]), strict_variables: true).tap do
        if template.errors&.length&.positive?
          puts template.errors
          raise template.errors.map(&:to_s).join('; ')
        end
      end
    end
1347319
def render_erb
      renderer = ERB.new(template_content, nil, '-')
      renderer.filename = @template_file
      renderer.result(binding)
    end
810997
def render(self, template, fail='## :todo: add {template}'):
        
        try:
            return self._templates[template].render(scaffold=self)
        except KeyError:
            return fail.format(template=template)
651197
def render_open_tag options
      out = '<' + tag_name
      unless attributes.empty?
        attributes.each do |name,value|
          name = name.to_s.gsub('_', '-') if name.is_a? Symbol
          value = value.to_s.gsub('_', '-') if value.is_a? Symbol

          case value
          when false
            next
          when true
            if options[:format] == Rxhp::XHTML_FORMAT
              out += ' ' + name + '="' + name + '"'
            else
              out += ' ' + name
            end
          else
            out += ' ' + name.to_s + '="' + html_escape(value.to_s) + '"'
          end
        end
      end

      if options[:format] == Rxhp::XHTML_FORMAT && !children?
        out + ' />'
      else
        out + '>'
      end
    end
1001629
def render options = {}
      validate!
      options = fill_options(options)

      open = render_open_tag(options)
      inner = render_children(options)
      close = render_close_tag(options)

      if options[:pretty]
        indent = ' ' * (options[:indent] * options[:depth])
        out = indent.dup
        out << open << "\n"
        out << inner if inner
        out << indent << close << "\n" if close && !close.empty?
        out
      else
        out = open
        out << inner if inner
        out << close if close
        out
      end
    end
79739
def render_page(url, status)
      # get content - if the admin isn't logged in your add the extra status requirements
      if !current_user.blank? && !params[:admin_preview].blank? && params[:admin_preview] == 'true'
        @content = Post.where("post_type = 'page' AND post_visible = 'Y' AND (post_status = 'Published' OR post_status = 'Draft')").find_by_structured_url("/#{url}")
      else
        @content = Post.where(status + " AND post_type = 'page' AND post_visible = 'Y'").find_by_structured_url("/#{url}")
      end

      # add a breadcrumb for each of its parents by running through each segment
      url.split('/').each do |u|
        p = Post.where(:post_type => 'page').find_by_post_slug(u)
        if p
          add_breadcrumb "#{p.post_title.capitalize}", "#{p.structured_url}", :title => "Back to #{p.post_title.capitalize}"
        end
      end
      # if content if blank return a 404
      render_404 and return if @content.blank?
      gloalize @content

      # if the content id is the same as the home page redirect to the home page do not render the content
      if !Setting.get('home_page').blank? && Setting.get('home_page').to_i == @content.id
        redirect_to site_url
      else
        render_template 'page'
      end

    end