From bf55a7fbb1f27ca815ac1e2ee04867686851a134 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Jun 2009 21:40:06 -0400 Subject: meta: Add openid delegate parameter to allow delegating only openid or openid2. --- doc/ikiwiki/directive/meta.mdwn | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index f29a118bf..7a7b0fa19 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -78,6 +78,9 @@ Supported fields: server="http://www.myopenid.com/server" xrds-location="http://www.myopenid.com/xrds?username=joeyh.myopenid.com""]] + By default this will delegate for both `openid` and `openid2`. To only + delegate for one, add a parameter such as `delegate=openid`. + * link Specifies a link to another page. This can be used as a way to make the -- cgit v1.2.3 From ce85eaab9da23cfaa177b934e4c25d64f6651929 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 8 Jun 2009 21:44:52 -0400 Subject: reorg --- doc/ikiwiki/directive/meta.mdwn | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/meta.mdwn b/doc/ikiwiki/directive/meta.mdwn index 7a7b0fa19..000f461c9 100644 --- a/doc/ikiwiki/directive/meta.mdwn +++ b/doc/ikiwiki/directive/meta.mdwn @@ -68,19 +68,21 @@ Supported fields: * openid Adds html <link> tags to perform OpenID delegation to an external - OpenID server (for `openid` and `openid2`). An optional `xrds-location` + OpenID server. This lets you use an ikiwiki page as your OpenID. + + By default this will delegate for both `openid` and `openid2`. To only + delegate for one, add a parameter such as `delegate=openid`. + + An optional `xrds-location` parameter lets you specify the location of any [eXtensible Resource DescriptorS](http://www.windley.com/archives/2007/05/using_xrds.shtml). - This lets you use an ikiwiki page as your OpenID. Example: + Example: \\[[!meta openid="http://joeyh.myopenid.com/" server="http://www.myopenid.com/server" xrds-location="http://www.myopenid.com/xrds?username=joeyh.myopenid.com""]] - By default this will delegate for both `openid` and `openid2`. To only - delegate for one, add a parameter such as `delegate=openid`. - * link Specifies a link to another page. This can be used as a way to make the -- cgit v1.2.3 From 6848a2e8821ca4e7621545cf2c8d4d21be5e4d4c Mon Sep 17 00:00:00 2001 From: PaulePanter Date: Sat, 13 Jun 2009 12:12:58 -0400 Subject: Documentation for parameter `template`? --- doc/ikiwiki/directive/inline/discussion.mdwn | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index e301190bf..9de80bf3e 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -30,3 +30,13 @@ Is there a simple way to exclude images, stylesheets, and other > The [[plugins/filecheck]] plugin adds a 'ispage()' pagespec test that can do that. > --[[Joey]] + +--- + +## Documentation for parameter `template`? + +I would be especially interested in a list of variables which can be used in such a template. + +I have a page template with some structured information as parameters. For example `location="nowhere"` and `price="20"`. Is there a possibility to extract those information, i. e. access the parameters, to compose the item for the inline directive from these information? For example the line »Go to nowhere for 20 bugs.« is shown inlined. + +--[[PaulePanter]] -- cgit v1.2.3 From 1d38a99874ccb82ccf3ee52ac03171e3fe6df0fd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 14 Jun 2009 17:16:18 -0400 Subject: response from a shady glen --- doc/ikiwiki/directive/inline/discussion.mdwn | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index 9de80bf3e..3f62c2767 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -11,7 +11,7 @@ take it as far as implementing "replies" to other comments. -- Marcelo -> See [[todo/discussion_page_as_blog]] for some of my own thoughts on this +> See [[plugins/comments]] > --[[Joey]] --- @@ -37,6 +37,22 @@ Is there a simple way to exclude images, stylesheets, and other I would be especially interested in a list of variables which can be used in such a template. -I have a page template with some structured information as parameters. For example `location="nowhere"` and `price="20"`. Is there a possibility to extract those information, i. e. access the parameters, to compose the item for the inline directive from these information? For example the line »Go to nowhere for 20 bugs.« is shown inlined. +> I try to keep ikiwiki's templates self-documenting, so if you take +> a look at a template used by inline, such as the default `/usr/share/ikiwiki/template/inlinepage.tmpl`, +> you can see all or nearly all the template variables in use in it. + +I have a page template with some structured information as parameters. For +example `location="nowhere"` and `price="20"`. Is there a possibility to +extract those information, i. e. access the parameters, to compose the item +for the inline directive from these information? For example the line »Go +to nowhere for 20 bugs.« is shown inlined. --[[PaulePanter]] + +> Let's not confuse the template directive with the templates used by inline. +> When a page is inlined, any template directives in it are first expanded, +> using the user-defined templates for that. Then, the inline directive's +> template is used to insert it into the inlining page. +> +> So no, you can't reference template directive parameters inside inline's +> template, because it's already expanded at that point. --[[Joey]] -- cgit v1.2.3 From 2b722cfd689f789b786624c36046f8992fabefe9 Mon Sep 17 00:00:00 2001 From: "http://hendry.iki.fi/" Date: Mon, 22 Jun 2009 06:27:56 -0400 Subject: templating question --- doc/ikiwiki/directive/inline/discussion.mdwn | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index 3f62c2767..f7f091a4f 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -56,3 +56,34 @@ to nowhere for 20 bugs.« is shown inlined. > > So no, you can't reference template directive parameters inside inline's > template, because it's already expanded at that point. --[[Joey]] + +## meta parameters are not enough + +I think I have the same problem as Paule, as I want extra arbitary parameters in my template. + +This is what I am doing currently, which makes my skin crawl. In `wgts/foo.mdwn` +I have resorted to using AUTHORURL as the location of this widgets icon: + + [[!meta authorurl="/ico/aHR0cDovL2JvbmRpLm9tdHAub3JnL3dpZGdldHMvYmF0dGVyeQ==.png" ]] + +In templates I have a file called `wgtlist.tmpl`: + +
+ + + + +
+ +
+
+ Posted +
+ +My index page has: + + [[!inline pages="./wgts/*" show=5 feeds=no actions=no rootpage="wgts" archive="yes" template=wgtlist]] + +Else can you please suggest a smarter way of getting certain data out from pages for a inline index? + +--[[hendry]] -- cgit v1.2.3 From 2d01a51aab8753d3985b23c81cfe73cfe217d8da Mon Sep 17 00:00:00 2001 From: PaulePanter Date: Sun, 28 Jun 2009 17:30:18 -0400 Subject: Further question on how to format or specify what `inline` should display. --- doc/ikiwiki/directive/inline/discussion.mdwn | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index f7f091a4f..02530ce08 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -57,6 +57,23 @@ to nowhere for 20 bugs.« is shown inlined. > So no, you can't reference template directive parameters inside inline's > template, because it's already expanded at that point. --[[Joey]] +>> Thank you for the explanation. Can you think of another way to accomplish +>> my goals? +>> +>> Right now, I only see the option to edit the title with the +>> `[[/ikiwiki/directive/meta]]` directive and the field `title`. +>> +>> How could a solution look like? +>> +>> 1. The possibility to add custom fields to the `meta` directive. +>> 1. The possibility to specify in a page, how the page should be displayed +>> when used by inlined. That could be done by a new directive `cinlined` +>> (for »custom inlined«) which is chosen by the `inline` directive to +>> display if told to do so. +>> +>> [[!cinlined text="""Text which can also use Parameter, bla blubb …"""]] +>> --[[PaulePanter]] + ## meta parameters are not enough I think I have the same problem as Paule, as I want extra arbitary parameters in my template. -- cgit v1.2.3 From 137c70aeb3d6f87f4ba65410dbc10f3d153fc7e7 Mon Sep 17 00:00:00 2001 From: "http://smcv.pseudorandom.co.uk/" Date: Mon, 29 Jun 2009 07:48:30 -0400 Subject: try using conditional? --- doc/ikiwiki/directive/inline/discussion.mdwn | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'doc/ikiwiki') diff --git a/doc/ikiwiki/directive/inline/discussion.mdwn b/doc/ikiwiki/directive/inline/discussion.mdwn index 02530ce08..be0665d04 100644 --- a/doc/ikiwiki/directive/inline/discussion.mdwn +++ b/doc/ikiwiki/directive/inline/discussion.mdwn @@ -73,6 +73,26 @@ to nowhere for 20 bugs.« is shown inlined. >> >> [[!cinlined text="""Text which can also use Parameter, bla blubb …"""]] >> --[[PaulePanter]] +>>> You can make the body of a page change depending on whether it's being +>>> inlined, with the [[ikiwiki/directive/if]] directive from the +>>> [[plugins/conditional]] plugin: +>>> +>>> \[[!if test="inlined()" +>>> then="""[[!template id=productsummary +>>> location="Warehouse 23" price=20 +>>> ]]""" +>>> else="""[[!template id=productdetail +>>> location="Warehouse 23" price=20 +>>> description="Every home should have one" +>>> ]]""" +>>> ]] +>>> +>>> Perhaps that does some of what you want? +>>> +>>> If you want to go beyond that, my inclination would be to write +>>> a simple plugin to deal with whatever it is you want to do (bug +>>> metadata or product metadata or whatever) rather than prematurely +>>> generalizing. --[[smcv]] ## meta parameters are not enough -- cgit v1.2.3 From b1b7a2100f6b32ef6bf75e9992e10ed7d28f8525 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 11 Jul 2009 00:33:19 -0400 Subject: img: Pass the align parameter through to the generated img tag. --- IkiWiki/Plugin/img.pm | 1 + debian/changelog | 1 + doc/ikiwiki/directive/img.mdwn | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'doc/ikiwiki') diff --git a/IkiWiki/Plugin/img.pm b/IkiWiki/Plugin/img.pm index a186abdfc..78e378917 100644 --- a/IkiWiki/Plugin/img.pm +++ b/IkiWiki/Plugin/img.pm @@ -123,6 +123,7 @@ sub preprocess (@) { '" height="'.$im->Get("height").'"'. (exists $params{alt} ? ' alt="'.$params{alt}.'"' : ''). (exists $params{title} ? ' title="'.$params{title}.'"' : ''). + (exists $params{align} ? ' align="'.$params{align}.'"' : ''). (exists $params{class} ? ' class="'.$params{class}.'"' : ''). (exists $params{id} ? ' id="'.$params{id}.'"' : ''). ' />'; diff --git a/debian/changelog b/debian/changelog index e83e570d3..5001031df 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,7 @@ ikiwiki (3.1416) UNRELEASED; urgency=low * svn: Fix rcs_rename to properly scope call to dirname. + * img: Pass the align parameter through to the generated img tag. -- Joey Hess Wed, 08 Jul 2009 13:10:38 -0400 diff --git a/doc/ikiwiki/directive/img.mdwn b/doc/ikiwiki/directive/img.mdwn index 1d1f29bea..66efd008e 100644 --- a/doc/ikiwiki/directive/img.mdwn +++ b/doc/ikiwiki/directive/img.mdwn @@ -18,9 +18,9 @@ making the image smaller than the specified size. You can also specify only the width or the height, and the other value will be calculated based on it: "200x", "x200" -You can also pass `alt`, `title`, `class` and `id` parameters. These are -passed through unchanged to the html img tag. If you include a `caption` -parameter, the caption will be displayed centered beneath the image. +You can also pass `alt`, `title`, `class`, `align` and `id` parameters. +These are passed through unchanged to the html img tag. If you include a +`caption` parameter, the caption will be displayed centered beneath the image. The `link` parameter is used to control whether the scaled down image links to the full size version. By default it does; set "link=somepage" to link -- cgit v1.2.3