Page MenuHomePhabricator

Option to suppress attribute links in result tables of #ask
Closed, ResolvedPublic

Description

Author: christian

Description:
Normally SMW puts links to the attribute-pages on the caption of the columns in a result table of an #ask-query. I would like to disable this behaviour which seems to be impossible.

Example:
http://studienfuehrer.etv-darmstadt.org/Personenübersicht
The column header "Position" links to the page "Attribut:Position". I only want the "Position" to show up but
without the link on it.

Is there any way to achieve that yet? Would it require a big patch? (Would try to fix that myself if I at least knew where to look at in the source ...)


Version: unspecified
Severity: enhancement

Details

Reference
bz17376

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 21 2014, 10:27 PM
bzimport set Reference to bz17376.

christian wrote:

Not even a reply stating there's no chance to get such a feature? :(
If you could at least point me to the place in code I'd have to look at in order to do that myself I'd be quite happy ;)

dan.bolser wrote:

Hi, I'm just searching for any logs relating to a similar bug (the properties of type page are also linked, but you can fix that if you set 'link=none', however, unlike most options you can't set it 'link = none'). Anyway, the only option is to generate your own tabular output using a template. I wrote a 'howto' for this on smw.refereata.org:

http://smw.referata.com/wiki/Use_the_ask_template_format_to_create_tabular_output

Sadly I don't know where to point you in the code (I just spent 30 mins looking for the spot to fix the above problem). Its a real shame SMW isn't better at attracting developers, as I think its an excellent project with lots of latent talent among its users. http://producingoss.com/ ;-)

HTH,
Dan.

christian wrote:

Hi Dan,

thanks for the reply. I know about the template way but unfortunately that's very undynamic since I'd have to write one template per table (or at least for each different number of columns or a template with many #if's for every possible number of columns ;) ).

If there's no other input from the devs who actually know about that specific part of SMW I'll just have to trace the code somehow myself. Just hoped that this idea would be welcomed here so I would just have to wait for the next release ;D

Regards,
Chris

dan.bolser wrote:

did you try:

?position = hello

In your ask query? I went to go try that but the page seems locked down.

Else it shouldn't be too hard to track down where the link gets added in the code. (If you find it, I'd be interested to know where).

Cheers,
Dan.

christian wrote:

Hi Dan,

tried that. Unfortunately that really only changes the caption and doesn't affect the Link on it.

Will see if I can find that piece of code on the weekend.

Regards,
Chris

Fixed in SVN: #ask queries now can be given the parameter "headers=plain" to get unlinked property names. This also works in lists. The parameter "headers" existed already, with possible values being "show" (default) and "hide".

Extensions may not respect the new setting yet, but the code change should be compatible to existing code such that "plain" behaves like "show" in output formats that are not aware of the change.