« Test Subobject 0001 » : différence entre les versions

De Semantic MediaWiki - Sandbox

Aucun résumé des modifications
Aucun résumé des modifications
Balise : Éditeur de wikicode 2017
 
(2 versions intermédiaires par 2 utilisateurs non affichées)
Ligne 1 : Ligne 1 :
'''This page contains to subobjects as defined by the template [[Modèle:Test_Subobject_0001]].'''
'''This page contains to subobjects as defined by the template [[Modèle:Test_Subobject_0001]].'''


{{Test Subobject 0001:
{{Test Subobject 0001
|SO-ID=1
|SO-ID=1
|SO-Name=ABC
|SO-Name=ABC
Ligne 7 : Ligne 7 :
}}
}}


{{Test Subobject 0001:
{{Test Subobject 0001
|SO-ID=2
|SO-ID=2
|SO-Name=DEF
|SO-Name=DEF
Ligne 32 : Ligne 32 :
       |default    = No Subobject found
       |default    = No Subobject found
}}
}}
== Notes ==
There are several issues in how you use/apply subobjects (and the #ask) query.
First of all, the template [[Modèle:Test_Subobject_0001]] uses `::` as notation which is not supported, please see the documentation (e.g. Has number=...).
<pre><nowiki>
{{#subobject:Test Subobject 0001 with {{{SO-ID|}}}
            |Has number::{{{SO-ID|}}}
            |Has name::{{{SO-Name|}}}
            |Has status::{{{SO-Status|}}}
}}
</nowiki></pre>
Secondly, <nowiki>{{#ask: [[Has subobject::{{{FULLPAGENAME}}}]] </nowiki> is not going to work because the subobject is not identified as `Test_Subobject_0001`. If you insist on using  <nowiki>{{{FULLPAGENAME}}}</nowiki> you have to use the inverted form as in <nowiki>[[-Has subobject::{{{FULLPAGENAME}}}]]</nowiki>.
== Thanks for the advice ==
Your are right and I wonder why I did not see this when comparing my working definition and query with the not working ones. I belive that one gets sometimes somehow blind for the code one has written.

Dernière version du 12 juillet 2018 à 14:18

This page contains to subobjects as defined by the template Modèle:Test_Subobject_0001.

Then there is an inline query with

[[Has subobject::{{{FULLPAGENAME}}}]]

No Subobject found

Followed by an inline query with

[[Has subobject::+]] [[Has name::+]]  [[Has Status::+]]

No Subobject found

Notes

There are several issues in how you use/apply subobjects (and the #ask) query.

First of all, the template Modèle:Test_Subobject_0001 uses `::` as notation which is not supported, please see the documentation (e.g. Has number=...).

{{#subobject:Test Subobject 0001 with {{{SO-ID|}}}
            |Has number::{{{SO-ID|}}}
            |Has name::{{{SO-Name|}}}
            |Has status::{{{SO-Status|}}}
}}

Secondly, {{#ask: [[Has subobject::{{{FULLPAGENAME}}}]] is not going to work because the subobject is not identified as `Test_Subobject_0001`. If you insist on using {{{FULLPAGENAME}}} you have to use the inverted form as in [[-Has subobject::{{{FULLPAGENAME}}}]].

Thanks for the advice

Your are right and I wonder why I did not see this when comparing my working definition and query with the not working ones. I belive that one gets sometimes somehow blind for the code one has written.

Les cookies nous aident à fournir nos services. En utilisant nos services, vous acceptez notre utilisation de cookies.