Changes

Jump to navigation Jump to search
no edit summary
Line 44: Line 44:  
===Restricting Property Values===
 
===Restricting Property Values===
   −
When you create a new property that has a Page (or Text, or possibly other values) that can be assigned to a wide range of values, it might be nice to restrict those values to a particular subset so that typos don't render the property useless. This has been done on the [[Property:Is used in domain|Is used in domain]] and the [[Property:Is located in facility|Is located in facility]] properties. You will see a special property added to those property pages called [https://www.semantic-mediawiki.org/wiki/Help:Special_property_Allows_value_list Allows value list]. The [[https://www.semantic-mediawiki.org/wiki/Help:Special_property_Allows_value_list help link] provides all of the pertinent information, but of special importance is the following:
+
When you create a new property that has a Page (or Text, or possibly other values) that can be assigned to a wide range of values, it might be nice to restrict those values to a particular subset so that typos don't render the property useless. This has been done on the [[Property:Is used in domain|Is used in domain]] and the [[Property:Is located in facility|Is located in facility]] properties. You will see a special property added to those property pages called [https://www.semantic-mediawiki.org/wiki/Help:Special_property_Allows_value_list Allows value list]. The [[https://www.semantic-mediawiki.org/wiki/Help:Special_property_Allows_value_list help link] provides all of the pertinent information, but of special importance is the following:
    
  <nowiki>Two steps have to be taken to use this special property:
 
  <nowiki>Two steps have to be taken to use this special property:
Line 59: Line 59:     
This autogenerates the correct ordered list for everything marked [Property:Is domain]. One might think that using the |format=ul would create the appropriate unordered list format (with the * in front), but it apparently does not. Therefore, this query removes the page link (link=none) and reduces the entry to simple text, and then it uses the template ([Template:Starlist_for_allow_value_list]) to render the text with a * in front of it (''See [https://www.mediawiki.org/wiki/Help:Templates help on templates) for an explanation of templates'''. This works well.  
 
This autogenerates the correct ordered list for everything marked [Property:Is domain]. One might think that using the |format=ul would create the appropriate unordered list format (with the * in front), but it apparently does not. Therefore, this query removes the page link (link=none) and reduces the entry to simple text, and then it uses the template ([Template:Starlist_for_allow_value_list]) to render the text with a * in front of it (''See [https://www.mediawiki.org/wiki/Help:Templates help on templates) for an explanation of templates'''. This works well.  
 +
 +
If, for some reason, you do enter a value that is not on the allowed list of values, the page will render a small warning icon.
    
===Philosophy on New Properties===
 
===Philosophy on New Properties===
Basically, there isn't much of one. The beauty of properties is that you can add them, and mix and match them to form unique queries. I suspect that there will be a query that shows every piece of equipment in the Maker Hub. There could be one that shows everything - equipment, tools, supplies, etc. There could be one that shows equipment in the machine shop. And then, one can create more focused properties. I have initially created two as examples - [Property:Is sheet metal equipment|Is sheet metal equipment] and [Property:Is soldering iron equipment|Is soldering iron equipment]. I suspect that we will mark the [[Sheet Metal Shear]] as both [Property:Is equipment|Is equipment]  and [Property:Is sheet metal equipment|Is sheet metal equipment]. This way, the [[Sheet Metal Shear]] will show up on lists that show equipment as well as lists that show the more focused sheet metal equipment. However, [[Soldering Irons]] will be marked as [Property:Is equipment|Is equipment], but the [[Weller_WES51]] will only be marked as [Property:Is soldering iron equipment|Is soldering iron equipment]. This means that [[Soldering Irons]] will show up on a general equipment query, but the [[Weller_WES51]] will not. This decision is somewhat arbitrary and is left to the Wiki editors. In this case, there is no reason to see every particular type of soldering iron on a general equipment list, but the sheet metal sheer will show up.
+
Basically, there isn't much of one. The beauty of properties is that you can add them, and mix and match them to form unique queries. I suspect that there will be a query that shows every piece of equipment in the Maker Hub. There could be one that shows everything - equipment, tools, supplies, etc. There could be one that shows equipment in the machine shop. And then, one can create more focused properties. I have initially created two as examples - [Property:Is sheet metal equipment|Is sheet metal equipment] and [Property:Is soldering iron equipment|Is soldering iron equipment]. I suspect that we will mark the [[Sheet Metal Shear]] as both [Property:Is equipment|Is equipment]  and [Property:Is sheet metal equipment|Is sheet metal equipment]. This way, the [[Sheet Metal Shear]] will show up on lists that show equipment as well as lists that show the more focused sheet metal equipment. However, [[Soldering Irons]] will be marked as [Property:Is equipment|Is equipment], but the [[Weller_WES51]] will only be marked as [Property:Is soldering iron equipment|Is soldering iron equipment]. This means that [[Soldering Irons]] will show up on a general equipment query, but the [[Weller_WES51]] will not. This decision is somewhat arbitrary and is left to the Wiki editors. In this case, there is no reason to see every particular type of soldering iron on a general equipment list, but the sheet metal sheer will show up, like this: [[File:small_warning_icon.png|Small Warning Icon]].
 +
.

Navigation menu