Hi Ed,
You just need something like "[[Person:{{{Author|}}}|{{{Author|}}}]]" in
the template.
-Yaron
On Fri, Nov 20, 2015 at 1:14 AM, Ed <[email protected]> wrote:
> Hi everyone,
>
> Another question :)
>
> If we take the book/author example as a reference, I have created a
> namespace "Person" and a namespace "Book" so that when I have a book "Billy
> Bob" that page is not confused with the page for the author "Billy Bob".
> In edit mode it works well and I have "|values from namespace=Person",
> "|query string=namespace=Person" and "|query string=namespace=Book" in the
> right places. The autocomplete works and all.
>
> However... when the page is saved the namespace is dropped and the author
> is saved as "Billy Bob"... instead of "Person:Billy Bob". That means that
> the links for existing and non-existing authors point to the wrong
> namespace.
>
> I did add
> $smwgNamespacesWithSemanticLinks[NS_PERSON] = true;
> $smwgNamespacesWithSemanticLinks[NS_BOOK] = true;
> ...but that did not seem to make a difference.
>
> I played with it a bit and the issue seems a bit more complex than just
> adding "Person:" in front of the template call. When I did that I got
> different (and incorrect) behavior for exiting and non-existing pages.
>
> Ideally I would like to have it rendered as [Person:Billy Bob|Billy Bob] so
> that the screen is clean and the link correct.
>
> Thoughts?
>
> ---------------------------------------------------------------
> BTW, a couple of updates.
>
> On the validation of large lists I experimented a bit and I'm defining the
> valid values in the template itself. So far my largest lists have 160 and
> 240 values. The 160 is hierarchically defined as "type/subtype" and the
> 240 is a list of countries. So they both work very well with autocomplete
> when I use "input type=combobox|existing values only".
>
> On the validation I'll be doing the checks using javascript. I'll try to
> model it after the regexp part of the SematicFormsInput extension. Once it
> is working, if there is interest, I'll submit it for consideration as an
> extension enhancement. I have done quite a bit of work in php and js, but
> I'm totally new to jquery.
>
> Thanks!!
> _______________________________________________
> MediaWiki-l mailing list
> To unsubscribe, go to:
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
>
--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
_______________________________________________
MediaWiki-l mailing list
To unsubscribe, go to:
https://lists.wikimedia.org/mailman/listinfo/mediawiki-l