Service used to render the content of the template.

Do nothing by default but subclasses should put all their specific templating code in this method to regroup and simplify their logic

Note: to avoid inconsistencies, the template is automatically frozen (see freeze) after the invocation of rendering.

Property definitions

template $ Template :: rendering
	# Service used to render the content of the template.
	#
	# Do nothing by default but subclasses should put all their specific
	# templating code in this method to regroup and simplify their logic
	#
	# Note: to avoid inconsistencies, the template is automatically frozen
	# (see `freeze`) after the invocation of `rendering`.
	protected fun rendering do end
lib/template/template.nit:88,2--95,31

gen_nit $ NitModule :: rendering
	redef fun rendering
	do
		var header = header
		if header != null then add header

		var name = name
		if annotations.is_empty then
			add "module {name}\n\n"
		else
			add "module {name} is\n"
			for annotation in annotations do add "\t{annotation}\n"
			add "end\n\n"
		end

		for i in imports do
			if i.to_s.has("import ") then
				add i
			else
				add "import "
				add i
			end
			add "\n"
		end
		add "\n"

		for l in content do
			add l
			add "\n"
		end
	end
lib/gen_nit/gen_nit.nit:68,2--97,4

template $ TemplateMacro :: rendering
	# Render `replacement` or else `name`.
	redef fun rendering do
		if is_replaced then
			add replacement.as(not null)
		else
			add "%{name}%"
		end
	end
lib/template/macro.nit:294,2--301,4

template $ TmplComposer :: rendering
	redef fun rendering do add "- {name}\n"
lib/template/examples/tmpl_composer.nit:60,2--40

html $ Header :: rendering
	redef fun rendering do
		add "<h{level}{render_css_classes}>{text.write_to_string}"
		var subtext = self.subtext
		if subtext != null then add "<small>{subtext.write_to_string}</small>"
		add "</h{level}>"
	end
lib/html/bootstrap.nit:112,2--117,4

html $ ListItem :: rendering
	redef fun rendering do addn "<li{render_css_classes}>{text.write_to_string}</li>"
lib/html/bootstrap.nit:205,2--82

html $ BSIcon :: rendering
	redef fun rendering do
		add "<span{render_css_classes} aria-hidden=\"true\"></span>"
	end
lib/html/bootstrap.nit:229,2--231,4

html $ BSLabel :: rendering
	redef fun rendering do
		add "<span{render_css_classes}>{text.write_to_string}</span>"
	end
lib/html/bootstrap.nit:289,2--291,4

html $ BSBadge :: rendering
	redef fun rendering do
		add "<span{render_css_classes}>{text.write_to_string}</span>"
	end
lib/html/bootstrap.nit:313,2--315,4

html $ BSPageHeader :: rendering
	redef fun rendering do
		addn "<div{render_css_classes}>"
		addn text.write_to_string
		addn "</div>"
	end
lib/html/bootstrap.nit:341,2--345,4

html $ BSPanel :: rendering
	redef fun rendering do
		addn "<div{render_css_classes}>"
		var heading = self.heading
		if heading != null then
			addn "<div class=\"panel-heading\">"
			addn heading.write_to_string
			addn "</div>"
		end
		var body = self.body
		if body != null then
			addn "<div class=\"panel-body\">"
			addn body.write_to_string
			addn "</div>"
		end
		var footer = self.footer
		if footer != null then
			addn "<div class=\"panel-footer\">"
			addn footer.write_to_string
			addn "</div>"
		end
		addn "</div>"
	end
lib/html/bootstrap.nit:449,2--470,4

html $ OrderedList :: rendering
	redef fun rendering do
		addn "<ol{render_css_classes}>"
		for item in items do add item
		addn "</ol>"
	end
lib/html/bootstrap.nit:162,2--166,4

html $ UnorderedList :: rendering
	redef fun rendering do
		addn "<ul{render_css_classes}>"
		for item in items do add item
		addn "</ul>"
	end
lib/html/bootstrap.nit:190,2--194,4

html $ BSBreadCrumbs :: rendering
	redef fun rendering do
		items.last.css_classes.add "active"
		super
	end
lib/html/bootstrap.nit:259,2--262,4