Hi Marcelo,

The simplest solution would be to change the line in the template from:




...and then, within the {{{field}}} tag in the form definition, add something like "|values=pageA, pageB, pageC".

Basically, the form/template field would no longer correspond directly to the property.

At that point, you could remove the "Allows value" calls from the property - you can keep them, but they'd probably no longer be necessary.


On Wed, Mar 13, 2013 at 11:17 PM, Lists <lists@psycholutions.com> wrote:

keep in mind there might be a better solution.

MediaWiki distinguishes between {{PAGENAME}} and {{FULLPAGENAME}}


Why not create a smarter property with the shorter name - having type
string- sorry or type text following newer approaches?

You could also mix both kind of properties for different purposes.

c u steve

-----Ursprüngliche Nachricht-----
Von: Marcelo Chiaradía [mailto:chiaradiamarcelo@gmail.com]
Gesendet: Donnerstag, 14. März 2013 00:25
An: semediawiki-devel
Betreff: [SMW-devel] [SF] restringing pages on fields

Hello everybody,

I have the following situation:

I have defined a new namespace, and I have a property of type "page", which
allows the pages from my new namespace as values. This way I allow only a
few pages from the namespace.

my property code is somthing like this:

I have a SF to populate a template with a field that points to that

The thing is, the field shows a dropdown list from populated form my
property allowed values, and it shows the complete pagename, I mean

I want it to show only the pagename, without the namespace part.

Is there some way to achieve this feature?

This is the code of my porperty:

This is a property of type [[Has type::Page]].

Allowed values:
* [[Allows value::newNamespace:myPage]]

This is the code of my template:



And this is the code of my form:

{{{for template|MyTemplate}}}
{| class="formtable"
! PageData:
| {{{field|pageData}}}
{{{end template}}}

Thanks in advance,


Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
Semediawiki-devel mailing list

WikiWorks · MediaWiki Consulting · http://wikiworks.com