Generalize documentation helpers

Change-Id: Iaba69a433f25d2160857694b0b434c51c02c0367
diff --git a/templates/doc/ql.html.ep b/templates/doc/ql.html.ep
index 5cfcfa0..d09eeb6 100644
--- a/templates/doc/ql.html.ep
+++ b/templates/doc/ql.html.ep
@@ -4,39 +4,39 @@
 %# This should be stored when clicking on a specific query
 %# but the remembered section contains the id - not the query
 
-<h2 id="tutorial-top">Query Languages</h2>
+%= page_title
 
 <section id="examples">
   <h3>Example Queries</h3>
   
-  <p><strong><%= doc_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %></strong>: Find all occurrences of the lemma &quot;baum&quot; as annotated by the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.</p>
+  <p><strong><%= embedded_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %></strong>: Find all occurrences of the lemma &quot;baum&quot; as annotated by the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>.</p>
   %= doc_query poliqarp => '[base=Baum]'
 
-  <p><strong><%= doc_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %></strong>: Find all sequences of adjectives as annotated by Treetagger, that are repeated 3 to 5 times in a row.</p>
+  <p><strong><%= embedded_link_to 'Poliqarp', 'ql', 'poliqarp-plus' %></strong>: Find all sequences of adjectives as annotated by Treetagger, that are repeated 3 to 5 times in a row.</p>
   %= doc_query poliqarp => '[tt/p=ADJA]{3,5}'
 
-  <p><strong><%= doc_link_to 'Cosmas-II', 'ql', 'cosmas-2' %></strong>: Find all occurrences of the words &quot;der&quot; and &quot;Baum&quot;, in case they are in a maximum distance of 5 tokens. The order is not relevant.</p>
+  <p><strong><%= embedded_link_to 'Cosmas-II', 'ql', 'cosmas-2' %></strong>: Find all occurrences of the words &quot;der&quot; and &quot;Baum&quot;, in case they are in a maximum distance of 5 tokens. The order is not relevant.</p>
   %= doc_query cosmas2 => 'der /w5 Baum'
 
-  <p><strong><%= doc_link_to 'Cosmas-II', 'ql', 'cosmas-2' %></strong>: Find all sequences of a word starting with a &quot;d&quot; (using a wildcard) followed by an adjective as annotated in the mate foundry, followed by the word &quot;Baum&quot; (ignore the case), that is in a sentence element annotated by the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.</p>
+  <p><strong><%= embedded_link_to 'Cosmas-II', 'ql', 'cosmas-2' %></strong>: Find all sequences of a word starting with a &quot;d&quot; (using a wildcard) followed by an adjective as annotated in the mate foundry, followed by the word &quot;Baum&quot; (ignore the case), that is in a sentence element annotated by the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>.</p>
   <p><em>Be aware</em>: Minor incompatibilities with implemented languages may be announced with warnings.</p>
   %= doc_query cosmas2 => 'd* MORPH(mate/p=ADJA) $Baum #IN #ELEM(s)'
 
-  <p><strong><%= doc_link_to 'Poliqarp+', 'ql', 'poliqarp-plus' %></strong>: Find all nominal phrases as annotated using CoreNLP, that contain an adverb as annotated by OpenNLP, that is annotated as something starting with an &quot;A&quot; using regular expressions in Treetagger.</p>
+  <p><strong><%= embedded_link_to 'Poliqarp+', 'ql', 'poliqarp-plus' %></strong>: Find all nominal phrases as annotated using CoreNLP, that contain an adverb as annotated by OpenNLP, that is annotated as something starting with an &quot;A&quot; using regular expressions in Treetagger.</p>
   %= doc_query poliqarp => 'contains(<corenlp/c=NP>,{[opennlp/p=ADV & tt/p="A.*"]})', cutoff => 1
 
-  <p><strong><%= doc_link_to 'Poliqarp+', 'ql', 'poliqarp-plus' %></strong>: Find all sentences as annotated by the base foundry that start with a sequence of one token in present tense as annotated by Marmot and the lemma &quot;die&quot; annotated by the <%= doc_link_to 'default foundry', 'data', 'annotation' %>. Highlight both terms of the sequence.</p>
+  <p><strong><%= embedded_link_to 'Poliqarp+', 'ql', 'poliqarp-plus' %></strong>: Find all sentences as annotated by the base foundry that start with a sequence of one token in present tense as annotated by Marmot and the lemma &quot;die&quot; annotated by the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>. Highlight both terms of the sequence.</p>
   %= doc_query poliqarp => 'startswith(<base/s=s>, {1:[marmot/m=tense:pres]}{2:[base=die]})', cutoff => 1
 
-  <p><strong><%= doc_link_to 'Poliqarp+', 'ql', 'poliqarp-plus' %></strong>: Find all sequences of an article, followed by three to four adjectives and a noun as annotated by the Treetagger foundry, that finish a sentence. Highlight all parts of the sequence.</p>
+  <p><strong><%= embedded_link_to 'Poliqarp+', 'ql', 'poliqarp-plus' %></strong>: Find all sequences of an article, followed by three to four adjectives and a noun as annotated by the Treetagger foundry, that finish a sentence. Highlight all parts of the sequence.</p>
   %= doc_query poliqarp => 'focus(3:endswith(<base/s=s>,{3:[tt/p=ART]{1:{2:[tt/p=ADJA]{3,4}}[tt/p=NN]}}))', cutoff => 1
 
-  <p><strong><%= doc_link_to 'Annis', 'ql', 'annis' %></strong>: Find all occurrences of the sequence of two tokens annotated as adverbs by the <%= doc_link_to 'default foundry', 'data', 'annotation' %>.</p>
+  <p><strong><%= embedded_link_to 'Annis', 'ql', 'annis' %></strong>: Find all occurrences of the sequence of two tokens annotated as adverbs by the <%= embedded_link_to 'default foundry', 'data', 'annotation' %>.</p>
   %= doc_query annis => 'pos="ADV" & pos="ADV" & #1 . #2'
 
-  <p><strong><%= doc_link_to 'Annis', 'ql', 'annis' %></strong>: Find all determiner relations with the label <code>DET</code> by MALT where the relation sources are attributive possesive pronouns annotated by Tree Tagger.</p>
+  <p><strong><%= embedded_link_to 'Annis', 'ql', 'annis' %></strong>: Find all determiner relations with the label <code>DET</code> by MALT where the relation sources are attributive possesive pronouns annotated by Tree Tagger.</p>
   %= doc_query annis => 'tt/p="PPOSAT" ->malt/d[func="DET"] node'
 
-  <p><strong><%= doc_link_to 'CQL', 'ql', 'cql' %></strong>: Find all occurrences of the sequence &quot;der alte Mann&quot;.</p>
+  <p><strong><%= embedded_link_to 'CQL', 'ql', 'cql' %></strong>: Find all occurrences of the sequence &quot;der alte Mann&quot;.</p>
   %= doc_query cql => '"der alte Mann"'	
 </section>