From bb4a121222436473f3136064ba89d31995e40691 Mon Sep 17 00:00:00 2001 From: buo Date: Thu, 6 Aug 2009 13:40:26 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 doc/forum/Sidebar_with_links__63__.mdwn (limited to 'doc/forum/Sidebar_with_links__63__.mdwn') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn new file mode 100644 index 000000000..c3252062a --- /dev/null +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -0,0 +1,41 @@ +I'm trying to create a template to use as a sidebar with links. The template will be static +(no variables are used). I first created a page with this directive: \[[!template id=sidebar]], +and then created the template with the web interface. + +This is the code I put in the template: + +
+ + +
+ +This is the relevant part of the resulting html file `template/sidebar.html`: + +
+ +
+ +Note that the `` link has disappeared, and that `[External link](http://google.com/)` +has been copied literally instead of being converted to a link, as I expected. + +Worse, this is the relevant part of the html file of the page that includes the template: + +
+
    +
  • Existing internal link
  • +
  • ?Non-existing internal link
  • +
  • [External link](http://google.com/)
  • +
+
+ +Note that the `Existing internal link` is no longer a link. It is only text. + +What am I doing wrong? Any help or pointers will be appreciated. --[[buo]] -- cgit v1.2.3 From fc60d256ddf6ee60f2d3f4965ba6e4cc365323b4 Mon Sep 17 00:00:00 2001 From: Jogo Date: Thu, 6 Aug 2009 15:51:24 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/forum/Sidebar_with_links__63__.mdwn') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index c3252062a..7bc94242a 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -26,6 +26,8 @@ This is the relevant part of the resulting html file `template/sidebar.html`: Note that the `` link has disappeared, and that `[External link](http://google.com/)` has been copied literally instead of being converted to a link, as I expected. +> Templates aren't Markdown page. [[ikiwiki/WikiLink]] only are expanded. --[[Jogo]] + Worse, this is the relevant part of the html file of the page that includes the template:
-- cgit v1.2.3 From 9637e66932c72381adba4c56bb4d23d2539db717 Mon Sep 17 00:00:00 2001 From: buo Date: Fri, 7 Aug 2009 08:56:07 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/forum/Sidebar_with_links__63__.mdwn') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index 7bc94242a..f3deb29c0 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -28,6 +28,10 @@ has been copied literally instead of being converted to a link, as I expected. > Templates aren't Markdown page. [[ikiwiki/WikiLink]] only are expanded. --[[Jogo]] +>> Thanks for the help Jogo. Looking at the [[templates]] page, it says that +"...you can include WikiLinks and all other forms of wiki markup in the template." I read this +to mean that a template may indeed include Markdown. Am I wrong in my interpratation? --[[buo]] + Worse, this is the relevant part of the html file of the page that includes the template:
-- cgit v1.2.3 From 03bfd6c317a035434ba4abd59704d22f7535b664 Mon Sep 17 00:00:00 2001 From: buo Date: Fri, 7 Aug 2009 14:52:30 -0400 Subject: --- doc/forum/Sidebar_with_links__63__.mdwn | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'doc/forum/Sidebar_with_links__63__.mdwn') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index f3deb29c0..79da03e5f 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -32,6 +32,10 @@ has been copied literally instead of being converted to a link, as I expected. "...you can include WikiLinks and all other forms of wiki markup in the template." I read this to mean that a template may indeed include Markdown. Am I wrong in my interpratation? --[[buo]] +>> I discovered that if I eliminate all html from my sidebar.mdwn template, the links are +rendered properly. It seems that the mix of Markdown and html is confusing some part of +Ikiwiki. --[[buo]] + Worse, this is the relevant part of the html file of the page that includes the template:
-- cgit v1.2.3 From 8fba0e710186071ca0a776140fe7b6acc8f07dad Mon Sep 17 00:00:00 2001 From: buo Date: Fri, 7 Aug 2009 15:26:07 -0400 Subject: Solved. --- doc/forum/Sidebar_with_links__63__.mdwn | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'doc/forum/Sidebar_with_links__63__.mdwn') diff --git a/doc/forum/Sidebar_with_links__63__.mdwn b/doc/forum/Sidebar_with_links__63__.mdwn index 79da03e5f..790ee85a2 100644 --- a/doc/forum/Sidebar_with_links__63__.mdwn +++ b/doc/forum/Sidebar_with_links__63__.mdwn @@ -49,3 +49,10 @@ Worse, this is the relevant part of the html file of the page that includes the Note that the `Existing internal link` is no longer a link. It is only text. What am I doing wrong? Any help or pointers will be appreciated. --[[buo]] + +----- + +I think I have figured this out. I thought the template was filled and then +processed to convert Markdown to html. Instead, the text in each variable is +processed and then the template is filled. I somehow misunderstood the +[[templates]] page. -- [[buo]] -- cgit v1.2.3