User:Silverfish/SMW Guide: Difference between revisions

From LoadingReadyWiki
Jump to navigationJump to search
Silverfish (talk | contribs)
miniguide
 
Silverfish (talk | contribs)
No edit summary
Line 9: Line 9:
Finally, if you click on the AirDate Property, or click here [[Property:AirDate]], you can see Date is listed. This is the type of the property, and indicates that the AirDate is a date, so the system knows how to interpret it. You can edit the page to see the only markup is <nowiki>[[Has type::Date]]</nowiki>. That indicates that the property has the Date type, and you can replace Date with another type as appropriate. See [https://semantic-mediawiki.org/wiki/Help:Property_declaration] for more details. In fact, this means the Property page has property "Has type", with value "Date", as Property pages can have properties too.
Finally, if you click on the AirDate Property, or click here [[Property:AirDate]], you can see Date is listed. This is the type of the property, and indicates that the AirDate is a date, so the system knows how to interpret it. You can edit the page to see the only markup is <nowiki>[[Has type::Date]]</nowiki>. That indicates that the property has the Date type, and you can replace Date with another type as appropriate. See [https://semantic-mediawiki.org/wiki/Help:Property_declaration] for more details. In fact, this means the Property page has property "Has type", with value "Date", as Property pages can have properties too.


So that's the basic idea, and I will probably be adding to this later.
So that's the basic idea, and I will probably be adding to this later. I recommend looking at the Introduction to Semantic MediaWiki for more information [https://semantic-mediawiki.org/wiki/Help:Introduction_to_Semantic_MediaWiki]

Revision as of 12:28, 2 January 2015

This is a basic Guide to Semantic Mediawiki. The basic idea behind Semantic Mediawiki is that wikipages have properties, that are given values that describe themselves. For example, an Episode page on this wiki could have a Location property, and the value is simply the location that episode was filmed at. Properties have types, that describe the type data they contain. Location would probably be Page, as the location would have a page.

Air Date Example

I have set up an example, that I think will be useful. AirDate is a property that gives the date when an episode aired. User:Silverfish/Test Feed Dump Page is a test page that I have setup with the AirDate property set to May 25, 2011. Notice that the date looks normal in the article, but if you click browse properties, you can see the property AirDate, with the air date of 25 May 2011. This was done using a template, which is the recommended way of including properties. In the article, you can see the template {{AirDate|May 25, 2011}}, AirDate is the template name, and the date is the only parameter.

The template is here: Template:AirDate. If you look at the details it is [[AirDate::{{{1}}}]]. The air date is passed as a parameter, and will be processed as [[AirDate::May 25, 2011]]. That is in the syntax for Semantic Mediawiki. It says that the page it is inserted into (in this case using a template) has the property AirDate, and value May 25 2011. It is generally recommended to only use this markup inside the template, and use the template to include the property on a page.

Finally, if you click on the AirDate Property, or click here Property:AirDate, you can see Date is listed. This is the type of the property, and indicates that the AirDate is a date, so the system knows how to interpret it. You can edit the page to see the only markup is [[Has type::Date]]. That indicates that the property has the Date type, and you can replace Date with another type as appropriate. See [1] for more details. In fact, this means the Property page has property "Has type", with value "Date", as Property pages can have properties too.

So that's the basic idea, and I will probably be adding to this later. I recommend looking at the Introduction to Semantic MediaWiki for more information [2]