Hi Marcelo,
The simplest solution would be to change the line in the template from:
[[MyProperty::{{{pageData}}}]]
...to:
[[MyProperty::newNamespace:{{{pageData}}}]]
...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.
-Yaron
On Wed, Mar 13, 2013 at 11:17 PM, Lists <li...@psycholutions.com> wrote:
> Hi,
>
>
> keep in mind there might be a better solution.
>
> MediaWiki distinguishes between {{PAGENAME}} and {{FULLPAGENAME}}
>
> http://meta.wikimedia.org/wiki/Help:Magic_words
>
> 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:chiaradiamarc...@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
> property.
>
> The thing is, the field shows a dropdown list from populated form my
> property allowed values, and it shows the complete pagename, I mean
> "namespace:pagename".
>
> 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:
>
> <pre>
> {{MyTemplate
> |pageData=
> }}
> </pre>
>
> [[MyProperty::{{{pageData}}}]]
>
> And this is the code of my form:
>
> {{{for template|MyTemplate}}}
> {| class="formtable"
> ! PageData:
> | {{{field|pageData}}}
> |}
> {{{end template}}}
>
> Thanks in advance,
>
> Marcelo.
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_mar
> _______________________________________________
> Semediawiki-devel mailing list
> Semediawiki-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/semediawiki-devel
>
--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel