aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2011-11-13 21:32:29 +0100
committerKevin Chabowski <kevin@kch42.de>2011-11-13 21:32:29 +0100
commitecac90f5e5db1ca82d4653047636ef4c2c749015 (patch)
treeed6dc24f44f69453b2805e30bfd473aad60a0afd /ratatoeskr
parent48972a847fe48f5e2919caf1d777262c6f0121d8 (diff)
downloadratatoeskr-cms-ecac90f5e5db1ca82d4653047636ef4c2c749015.tar.gz
ratatoeskr-cms-ecac90f5e5db1ca82d4653047636ef4c2c749015.tar.bz2
ratatoeskr-cms-ecac90f5e5db1ca82d4653047636ef4c2c749015.zip
"%root%" in articles will be replaced with a path to page root.
Diffstat (limited to 'ratatoeskr')
-rw-r--r--ratatoeskr/frontend.php4
-rw-r--r--ratatoeskr/templates/src/systemtemplates/content_write.html3
2 files changed, 5 insertions, 2 deletions
diff --git a/ratatoeskr/frontend.php b/ratatoeskr/frontend.php
index 7995093..a2f1f8d 100644
--- a/ratatoeskr/frontend.php
+++ b/ratatoeskr/frontend.php
@@ -97,8 +97,8 @@ function article_transform_ste($article, $lang)
"urlname" => $article->urlname,
"fullurl" => htmlesc("$rel_path_to_root/$lang/{$article->section->name}/{$article->urlname}"),
"title" => htmlesc($article->title[$lang]->text),
- "text" => textprocessor_apply_translation($article->text[$lang]),
- "excerpt" => textprocessor_apply_translation($article->excerpt[$lang]),
+ "text" => textprocessor_apply_translation(str_replace("%root%", $rel_path_to_root, $article->text[$lang])),
+ "excerpt" => textprocessor_apply_translation(str_replace("%root%", $rel_path_to_root, $article->excerpt[$lang])),
"custom" => $article->custom,
"status" => $article->status,
"section" => section_transform_ste($article->section, $lang),
diff --git a/ratatoeskr/templates/src/systemtemplates/content_write.html b/ratatoeskr/templates/src/systemtemplates/content_write.html
index 81a4d9b..9ec9548 100644
--- a/ratatoeskr/templates/src/systemtemplates/content_write.html
+++ b/ratatoeskr/templates/src/systemtemplates/content_write.html
@@ -25,6 +25,9 @@
</ste:if>
<div class="triplecolumns">
<div class="column_left">
+ <h2>Linking back</h2>
+ <p>The text <code>%root%</code> will be replaced with a path, that points to the root of your Ratatöskr page.</p>
+
<h2>Markdown Cheat Sheet</h2>
<h3>Emphasis / Strong</h3>