We got around this by using categories instead of namespaces, since they can be used as a selector in thr ask query
On Fri, 20 Nov 2015 06:15 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 > -- Love and waffles, PJosepherum _______________________________________________ MediaWiki-l mailing list To unsubscribe, go to: https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
