Last modified: 2014-01-13 20:58:15 UTC
User Story: As a user I'd like to be able to add new pages to a category directly from the categories Special:BrowseData page. The workflow would look like this: 1) Drilldown to see if a page exists 2) If the page does not exist, add it e.g. through #forminput --- My first idea was to inject something like a "header text" the same way the page tile could be set: [[Has drilldown header text::{{ #formlink:form=Person|link type=button }}]] or better: [[Has drilldown header text::{{ sometemplate }}]] The text should be shown below the title as a lead text for the page. --- A Category page could look like this: [[Has filter::Filter:Start Date| ]] [[Has filter::Filter:End Date| ]] [[Has filter::Filter:Status| ]] [[Has display parameters::?Start Date;?End Date;format=table| ]] [[Has drilldown header text::{{ #formlink:form=Project|link type=button }}]] [[Has drilldown footer text::This fancy drilldown page has been brought to you by wikiworks]]
Some thoughts by Yaron discussed offline: Well... it's kind of weird to say it, but one possibility is that maybe SMW special properties shouldn't be used at all for SD's value storage. [16:53:48] Yaron Koren: Creating new special properties brings with a lot of overhead, that may not be necessary. [16:54:09] Yaron Koren: This is somewhat, though only slightly, tied in with that SD proposal I sent out. [16:54:48] Yaron Koren: But MediaWiki has its own property-storage system, "page props", that may be better suited for this kind of thing - and if I had fully known about it when I first created SD, I may have just used that. [16:56:10] Yaron Koren: The idea is that, instead of using property tags, there would just be a call to a parser function like "{{#define_category_drilldown:filters=Start date,Status|header =...|footer=....}}".
The 'drilldown header text' could be inserted in SD_BrowseData.php > function getPageHeader() below this line... $header .= ' <div id="drilldown-header">' . "\n"; ... right before the filter-specific messages/output is printed.
In SemanticDrilldown.php > function sdfInitProperties() add SD_SP_HAS_DRILLDOWN_HEADER_TEXT => array( '_SD_HT', '_str' ), SD_SP_HAS_DRILLDOWN_FOOTER_TEXT => array( '_SD_FT', '_str' ), to array $sd_property_vals. Add SD_SP_HAS_DRILLDOWN_HEADER_TEXT and SD_SP_HAS_DRILLDOWN_FOOTER_TEXT to the languages/SD_LanguageXX.php files.
Created attachment 14136 [details] First Patch (footer text not yet implemented)
#formlink/#forminput could be injected in an introtemplate using the template format. With #29463 fixed, we could combine the template format with other result formats.
Removing dependency - these issues are not necessarily fixed in the same way.