1 ## Combine inline and toggle
3 Is it possible to combine the behaviour of toggle and inline? ie, have it present of list of 'headlines' which are created from seperate subpages which can be clicked to expand to the body of the inlined page. Thanks.
8 ## How do you provide the per post discussion links in your own blog?
10 > That's configured by the "actions" parameter to the inline directive. See
11 > docs in [[plugins/inline]]. --[[Joey]]
13 And do you have any ideas/hints about implementing a "comments" feature.
14 What I'm after is something for users who don't quite understand the Wiki
15 style for discussions. I would like to have a form for them to post a
16 comment and have the comment appended to the discussion Wiki-style. Maybe
17 take it as far as implementing "replies" to other comments.
21 > See [[plugins/comments]]
26 ## More dynamic `rootpage` parameter of inline plugin?
28 (Moved to [[todo/dynamic_rootpage]])
34 Is there a simple way to exclude images, stylesheets, and other
35 "non-page" files other than a blacklist approach like
36 `pages="* and !*.png and !*.css"`? --[[JasonBlevins]]
38 > The [[plugins/filecheck]] plugin adds a 'ispage()' pagespec test that can do that.
43 ## Documentation for parameter `template`?
45 I would be especially interested in a list of variables which can be used in such a template.
47 > I try to keep ikiwiki's templates self-documenting, so if you take
48 > a look at a template used by inline, such as the default `/usr/share/ikiwiki/template/inlinepage.tmpl`,
49 > you can see all or nearly all the template variables in use in it.
51 I have a page template with some structured information as parameters. For
52 example `location="nowhere"` and `price="20"`. Is there a possibility to
53 extract those information, i. e. access the parameters, to compose the item
54 for the inline directive from these information? For example the line »Go
55 to nowhere for 20 bugs.« is shown inlined.
59 > Let's not confuse the template directive with the templates used by inline.
60 > When a page is inlined, any template directives in it are first expanded,
61 > using the user-defined templates for that. Then, the inline directive's
62 > template is used to insert it into the inlining page.
64 > So no, you can't reference template directive parameters inside inline's
65 > template, because it's already expanded at that point. --[[Joey]]
67 >> Thank you for the explanation. Can you think of another way to accomplish
70 >> Right now, I only see the option to edit the title with the
71 >> `[[/ikiwiki/directive/meta]]` directive and the field `title`.
73 >> How could a solution look like?
75 >> 1. The possibility to add custom fields to the `meta` directive.
76 >> 1. The possibility to specify in a page, how the page should be displayed
77 >> when used by inlined. That could be done by a new directive `cinlined`
78 >> (for »custom inlined«) which is chosen by the `inline` directive to
79 >> display if told to do so.
81 >> [[!cinlined text="""Text which can also use Parameter, bla blubb …"""]]
83 >>> You can make the body of a page change depending on whether it's being
84 >>> inlined, with the [[ikiwiki/directive/if]] directive from the
85 >>> [[plugins/conditional]] plugin:
87 >>> \[[!if test="inlined()"
88 >>> then="""[[!template id=productsummary
89 >>> location="Warehouse 23" price=20
91 >>> else="""[[!template id=productdetail
92 >>> location="Warehouse 23" price=20
93 >>> description="Every home should have one"
97 >>> Perhaps that does some of what you want?
99 >>> If you want to go beyond that, my inclination would be to write
100 >>> a simple plugin to deal with whatever it is you want to do (bug
101 >>> metadata or product metadata or whatever) rather than prematurely
102 >>> generalizing. --[[smcv]]
104 ## meta parameters are not enough
106 I think I have the same problem as Paule, as I want extra arbitary parameters in my template.
108 This is what I am doing currently, which makes my skin crawl. In `wgts/foo.mdwn`
109 I have resorted to using AUTHORURL as the location of this widgets icon:
111 [[!meta authorurl="/ico/aHR0cDovL2JvbmRpLm9tdHAub3JnL3dpZGdldHMvYmF0dGVyeQ==.png" ]]
113 In templates I have a file called `wgtlist.tmpl`:
116 <TMPL_IF NAME="AUTHORURL">
117 <img src="<TMPL_VAR AUTHORURL>" />
119 <TMPL_IF NAME="PERMALINK">
120 <a href="<TMPL_VAR PERMALINK>"><TMPL_VAR TITLE></a><br />
122 <a href="<TMPL_VAR PAGEURL>"><TMPL_VAR TITLE></a><br />
124 Posted <TMPL_VAR CTIME>
129 [[!inline pages="./wgts/*" show=5 feeds=no actions=no rootpage="wgts" archive="yes" template=wgtlist]]
131 Else can you please suggest a smarter way of getting certain data out from pages for a inline index?
135 ## A different idea: smuggling hook routines in through %params.
137 The part that fetches the inlined content is quite compact. It's just the if ($needcontent) {} chunk. Would a patch that accepts a perl sub smuggled through something like $params{inliner_} be accepted? If that param exists, call it instead of the current content of that chunk. Pass $page, %params, and $template. Receive $content, possibly seeing $template modified. The custom directives can add inliner_ to %params and call IkiWiki::preprocess_inline. I suppose IkiWiki::Plugin::inline could be modified to strip any *_ out of the directive's arguments to prevent any custom behavior from leaking into the inline directive.
139 I'm about to try this for a CV/resume type of thing. I want only one element with a specific id out of the generated content (with a little post-processing). I don't need performance for my case.
141 Update: Pretty much works. I need a way to skip sources, but inline shrinks the list of all pages *before* trying to form them. Next little bit...
147 ## Interaction of `show` and `feedshow`
149 Reading the documentation I would think that `feedshow` does not
152 \[[!inline pages="./blog/*" archive=yes quick=yes feedshow=10 sort=title reverse=yes]]
154 Only ten pages are listed in this example although `archive` is set to
155 yes. Removing `feedshow=10` all matching pages are shown.
157 Is that behaviour intended?
159 > Is something going wrong because `quick="yes"` [[»turns off generation of any feeds«|inline]]? --[[PaulePanter]]
163 >> Bug was that if feedshow was specified without show it limited to it incorrectly. Fixed. --[[Joey]]