From ecac90f5e5db1ca82d4653047636ef4c2c749015 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Sun, 13 Nov 2011 21:32:29 +0100 Subject: "%root%" in articles will be replaced with a path to page root. --- ratatoeskr/frontend.php | 4 ++-- ratatoeskr/templates/src/systemtemplates/content_write.html | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'ratatoeskr') 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 @@
+

Linking back

+

The text %root% will be replaced with a path, that points to the root of your Ratatöskr page.

+

Markdown Cheat Sheet

Emphasis / Strong

-- cgit v1.2.3-70-g09d2