recipe for not displaying namespaces for properties of type Page

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

recipe for not displaying namespaces for properties of type Page

mbenard
Hi,
 I spent some time to find out how to do it , so here it is.

Given a property "myproperty" of type "Page", I didn't want the namespaces
of "myproperty" values  to be shown on pages having the semantic property
"myproperty".

That is instead of seeing on such pages  :

myproperty=Namespace1:page1, Namespace1:page2,

I wanted to see

myproperty=page1,page2     (however with hyperlinks to Namespace1:page1,
Namespace1:page2)

To achievie  this , in the page Page template  I replaced:

{{#arraymap:{{{mypropertyfield|}}}|,|x|[[myproperty::x]]}}

with  :

{{#arraymap:{{{mypropertyfield|}}}|,|x|{{#set myproperty=x}}}}
{{#arraymap:{{{mypropertyfield|}}}|,|x|[[x|{{ROOTPAGENAME:x}}]]}}




The first line adds the semantic property to the page without displaying
it
The second one displays the property without the namespace and with  a
link to the full page name


Note : I tried to use the parser function explode instead of ROOTPAGENAME
but it did not work.

Cheers,

Michel Bénard
Urbaniste
----------------------------- Disclaimer ------------------------------
--- Ce message ainsi que les éventuelles pièces jointes constituent une
correspondance privée et confidentielle à l'attention exclusive du
destinataire désigné ci-dessus. Si vous n'êtes pas le destinataire du
présent message ou une personne susceptible de pouvoir le lui délivrer,
il vous est signifié que toute divulgation, distribution ou copie,
totale ou partielle, sur un quelconque support de cette transmission
est strictement interdite. Si vous avez recu ce message par erreur,
nous vous remercions d'en informer l'expéditeur par téléphone ou de lui
retourner le présent message, puis d'effacer immédiatement ce message
de votre systeme. Tout message électronique est susceptible
d'altération. Le "groupement des Mousquetaires" décline toute
responsabilité au titre de ce message s'il a été altéré, déformé ou
falsifié.---
--- This e-mail and any attachments is a confidential correspondence
intended only for use of the individual or entity named above. If you
are not the intended recipient or the agent responsible for delivering
the message to the intended recipient, you are hereby notified that any
disclosure, distribution or copying, either whole or partial, in any
medium of this communication is strictly prohibited. If you have
received this communication by mistake, please notify the sender by
phone or by replying this message, and then delete this message from
your system. E-mails are susceptible of alteration. The
"Mousquetaires' group" shall not therefore be liable for the message
if altered, changed or falsified.---
-----------------------------------------------------------------------

 
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: recipe for not displaying namespaces for properties of type Page

planetenxin
Do you know Semantic Title [0] and Display Title extensions [1]?

[0] https://www.mediawiki.org/wiki/Extension:Semantic_Title
[1] https://www.mediawiki.org/wiki/Extension:Display_Title


Am 24.05.2017 um 11:03 schrieb [hidden email]:

> Hi,
>  I spent some time to find out how to do it , so here it is.
>
> Given a property "myproperty" of type "Page", I didn't want the namespaces
> of "myproperty" values  to be shown on pages having the semantic property
> "myproperty".
>
> That is instead of seeing on such pages  :
>
> myproperty=Namespace1:page1, Namespace1:page2,
>
> I wanted to see
>
> myproperty=page1,page2     (however with hyperlinks to Namespace1:page1,
> Namespace1:page2)
>
> To achievie  this , in the page Page template  I replaced:
>
> {{#arraymap:{{{mypropertyfield|}}}|,|x|[[myproperty::x]]}}
>
> with  :
>
> {{#arraymap:{{{mypropertyfield|}}}|,|x|{{#set myproperty=x}}}}
> {{#arraymap:{{{mypropertyfield|}}}|,|x|[[x|{{ROOTPAGENAME:x}}]]}}
>
>
>
>
> The first line adds the semantic property to the page without displaying
> it
> The second one displays the property without the namespace and with  a
> link to the full page name
>
>
> Note : I tried to use the parser function explode instead of ROOTPAGENAME
> but it did not work.
>
> Cheers,
>
> Michel Bénard
> Urbaniste
> ----------------------------- Disclaimer ------------------------------
> --- Ce message ainsi que les éventuelles pièces jointes constituent une
> correspondance privée et confidentielle à l'attention exclusive du
> destinataire désigné ci-dessus. Si vous n'êtes pas le destinataire du
> présent message ou une personne susceptible de pouvoir le lui délivrer,
> il vous est signifié que toute divulgation, distribution ou copie,
> totale ou partielle, sur un quelconque support de cette transmission
> est strictement interdite. Si vous avez recu ce message par erreur,
> nous vous remercions d'en informer l'expéditeur par téléphone ou de lui
> retourner le présent message, puis d'effacer immédiatement ce message
> de votre systeme. Tout message électronique est susceptible
> d'altération. Le "groupement des Mousquetaires" décline toute
> responsabilité au titre de ce message s'il a été altéré, déformé ou
> falsifié.---
> --- This e-mail and any attachments is a confidential correspondence
> intended only for use of the individual or entity named above. If you
> are not the intended recipient or the agent responsible for delivering
> the message to the intended recipient, you are hereby notified that any
> disclosure, distribution or copying, either whole or partial, in any
> medium of this communication is strictly prohibited. If you have
> received this communication by mistake, please notify the sender by
> phone or by replying this message, and then delete this message from
> your system. E-mails are susceptible of alteration. The
> "Mousquetaires' group" shall not therefore be liable for the message
> if altered, changed or falsified.---
> -----------------------------------------------------------------------
>
>  
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>


--
________________________________________________
semantic::apps by gesinn.it
Business Applications with Semantic Mediawiki.
http://semantic-apps.com

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user