Help:Embedded format
| Embedded format |
|---|
| What: |
| Embed selected articles. |
| Provided by: |
| Semantic MediaWiki |
| Added in version: |
| 0.7 |
| Removed in version: |
| still supported |
| Further Requirements: |
| none |
| Format name: |
| embedded |
| Authors: |
| Markus Krötzsch |
| Categories: |
| misc |
The result format embedded is used to embed the contents of the pages in a query result into a page. The embedding uses MediaWiki transclusion (like when inserting a template), so the tags <includeonly> and <noinclude> work for controlling what is displayed.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| limit | Whole number | 20 | The maximum number of results to return |
| offset | Whole number | 0 | The offset of the first result |
| headers | Text | show | Display the headers/property names |
| mainlabel | Text | no | The label to give to the main page name |
| link | Text | all | Show values as links |
| embedformat | Text | empty | The HTML tag used to define headings |
| embedonly | Yes/no | empty | Display no headings |
The embedded format introduces the following additional parameters:
- embedformat: this defines which kinds of headings to use when pages are embedded, may be a heading level, i.e. one of h1, h2, h3, h3, h4, h5, h6, or a description of a list format, i.e. one of ul and ol
- embedonly: if this parameter has any value (e.g. «true»), then no headings are used for the embedded pages at all.
Example
The following creates a list of recent news posted on this site (like in a blog):
{{#ask: [[News date::+]] [[language code::en]]
| sort=news date
| order=descending
| format=embedded
| embedformat=h3
| searchlabel= view older news
| limit=3
}}
This produces the following output:
Semantic MediaWiki 1.7.0 released
Jan 1 2012. Semantic MediaWiki 1.7.0, the next major version after 1.6.1, has now been released. This new version brings a significant number of internal changes and fixes. Notable additions are native subobjects, an Ask API and an alpha version of Special:QueryCreator. Upgrading from earlier versions of SMW is easy but needs some additional steps in certain cases, see Installation 1.7.0 for details. Further information can be found on the SMW 1.7.0 page.SMWCon Spring 2012 to be held in Carlsbad, California
November 30, 2011. The location and dates of the next SMWCon, or Semantic MediaWiki Conference, have been announced: it will be held at the Tri-City Wellness Center in Carlsbad, California, USA (a city located between San Diego and Los Angeles) on April 25-27, 2012. The event will be sponsored by ai-one, a San Diego software company. The first day will include tutorials for beginners to SMW; this will be followed by a two-day regular conference.
For more information, see the SMWCon Spring 2012 homepage.
SMWCon Fall 2011 talks and presentations on YouTube
November 1, 2011. Videos of talks and presentations from SMWCon Fall 2011, which was held on September 21-23 in Berlin, Germany, have been uploaded to YouTube. The entire set of links to the videos is viewable here. The event itself was a big success, with about 40 attendees representing developers and users from all over the world.
Note that a newline (<br>) is used to put the further results link on a separate line.
Remarks
Note that embedding pages may accidently include category statements if the embedded articles have any categories. Use <noinclude> to prevent this, e.g. by writing
<noinclude>[[Category:News feed]]</noinclude>
SMW will take care that embedded articles do not import their semantic annotations, so these need not be treated specifically.
Also note that printout statements have no effect on embedding queries.