A set of forms and templates intended to be used on Properties pages to ease the process of defining list of values allows and a couple of other settings for a Property.
Property:Allows value- redefines the built-in SMW Allow value propertyTemplate:FormField- provides a{{FormField}}template for PageFormsTemplate:Get default value- retrieves default value from selected PropertyTemplate:Get values- retrives list of allowed values for a PropertyTemplate:Only existing- helper template for a{{field}}Form:Property- main form to edit Property pagesTemplate:Property- template for Property pagesProperty:Suggests value- property for suggestionsProperty:Value- base property forAllows valueandSuggests value
Form:TestPeropertyFormUsage- example formProperty:TestProp1- example property
- Create new property using
Special:FormEdit/Property - Use
FormFieldtemplate to link properties to PageForms form like below:
{{FormField|FieldName|PropertyName|<nowiki>|input type=tokens</nowiki>}}
This will link all the allowed, suggested values automatically, same as the default value for a property.
- PageExchange
- PageForms
- SemanticMediaWiki
- Add the following to the bottom of your LocalSettings.php:
$wgPageExchangePackageFiles[] = 'https://raw.githubusercontent.com/NationalGalleryOfArt/mediawiki-pages-AllowedValues/main/page-exchange.json';- Navigate to
Special:Packagesand install the package. - (Optional) Run
php maintenance/runJobs.php.