Changes

Jump to navigation Jump to search
no edit summary
Line 51: Line 51:  
  Add permissible values as listed items starting either with "*" or "**" to the "MediaWiki:Smw_allows_list_..." page, e.g. "* Bar" or "** Foobar" to page "MediaWiki:Smw_allows_list_Foo".</nowiki>
 
  Add permissible values as listed items starting either with "*" or "**" to the "MediaWiki:Smw_allows_list_..." page, e.g. "* Bar" or "** Foobar" to page "MediaWiki:Smw_allows_list_Foo".</nowiki>
   −
However, might want to go one step further and auto-generate this list from our own properties. For instance, all of our domains are marked with the [Property:Is domain] and our facilities are marked with the [Property:Is facility]. If you view the pages for [MediaWiki:Smw_allows_list_Domains] and [MediaWiki:Smw_allows_list_Facilities], you will see that they have the correct unordered lists. But if you view the source, you will see something like the following (from [MediaWiki:Smw_allows_list_Domains]:
+
However, might want to go one step further and auto-generate this list from our own properties. For instance, all of our domains are marked with the [[Property:Is domain]] and our facilities are marked with the [[Property:Is facility]]. If you view the pages for [[MediaWiki:Smw_allows_list_Domains]] and [[MediaWiki:Smw_allows_list_Facilities]], you will see that they have the correct unordered lists. But if you view the source, you will see something like the following (from [[MediaWiki:Smw_allows_list_Domains]]:
 
  <nowiki>{{#ask: [[Is domain::True]]
 
  <nowiki>{{#ask: [[Is domain::True]]
 
  |format=template
 
  |format=template
Line 58: Line 58:  
  }} </nowiki>
 
  }} </nowiki>
   −
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.  
 
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, like this: [[File:small_warning_icon.png|12px|Small Warning Icon]].
+
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|12px|Small Warning Icon]].

Navigation menu