Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@@@ syntax to generate a property link #1855

Closed
mwjames opened this issue Sep 21, 2016 · 7 comments
Closed

@@@ syntax to generate a property link #1855

mwjames opened this issue Sep 21, 2016 · 7 comments
Labels
enhancement Alters an existing functionality or behaviour
Milestone

Comments

@mwjames
Copy link
Contributor

mwjames commented Sep 21, 2016

Creating a property link (as to be used in infoboxes or by templates) within a wiki-text requires some additional work and even though it can be done it will not allow to take advantage of auto-property descriptions (displayed as tooltip etc.) or in future to change to a preferred label (based on the user language).

To generate a property link within a text or template, the special syntax [[Foo::@@@]] is introduced, where @@@ will signal to the InTextAnnotationParser to handle it as non-value annotation and instead output a property link as seen in the examples.

Going with the special syntax seems more appropriate (and is less work) than introducing yet another parser function.

Examples

image

image

image

@mwjames mwjames added the enhancement Alters an existing functionality or behaviour label Sep 21, 2016
@mwjames mwjames added this to the SMW 2.5 milestone Sep 21, 2016
@mwjames
Copy link
Contributor Author

mwjames commented Sep 21, 2016

@kghbln FYI

@kghbln kghbln added the wikidocu missing Code changes (mostly features) what have not yet been documented label Sep 21, 2016
mwjames added a commit that referenced this issue Sep 21, 2016
Make InTextAnnotationParser aware of @@@ syntax, refs #1855
@mwjames mwjames closed this as completed Sep 21, 2016
@kghbln
Copy link
Member

kghbln commented Mar 15, 2017

@krabina
Copy link
Contributor

krabina commented Nov 16, 2018

Placeholder: https://www.semantic-mediawiki.org/wiki/Help:Property_links

I added some more wikidoku for this....

@kghbln kghbln removed the wikidocu missing Code changes (mostly features) what have not yet been documented label Jan 6, 2019
@krabina
Copy link
Contributor

krabina commented May 21, 2019

This is a great feature, but there are several use cases where in you wiki you don't want user to visit property pages.

So my question is if it would be possible to use the feature of having the preferred property label and property description showing up in a tooltip, but without the possibility to actualle click on it an got to the property page?
Could be achieved by something like [[Foo::@@@|@@@]].

The workaround is to use something like
{{#show:Property:Foo|?has preferred property label|+lang={{USERLANGUAGECODE}}}}
to display the correct name of the poperty and then also do the tooltip in a similar way which is a lot of coding and querying in templates...

@mwjames
Copy link
Contributor Author

mwjames commented May 22, 2019 via email

@krabina
Copy link
Contributor

krabina commented Nov 9, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Alters an existing functionality or behaviour
Projects
None yet
Development

No branches or pull requests

3 participants