Help:Embedded format
From semantic-mediawiki.org
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.
Contents |
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.4.0 released: easier upgrade and installation, better date support, special property integration, more robust
Nov 21 2008. The SMW Project is happy to announce the release of the new Semantic MediaWiki 1.4.0. The new version introduces a number of new features and general improvements. Please be sure to read the installation and upgrade instructions before updating an existing wiki. Read moreSMW Project releases SMW 1.4 alpha for extension developers
Oct 26 2008. Version 1.4 of Semantic MediaWiki will largely unify the treatment of "special properties" (like has type) and normal user-defined properties. Both can be queried in essentially the same ways, and new "special" properties will be introduced to allow new features. Together with other required clean-ups, this brings some changes for developers using SMW for their own extensions. To help extension developers in producing compatible updates for their software, the SMW Project releases an alpha version of SMW 1.4 which already includes all major internal API modifications. While many details changed their appearance, upgrading code to SMW 1.4 should in many cases boil down to some search and replace of small code pieces. Details will be discussed on the developer mailing listNew resources for developers
Aug 28 2008. As a service for developers of SMW and its extensions, this site now offers an online API documentation for Semantic MediaWiki that is updated daily from the current development code as found in SVN. The documentation currently includes SMW as well as the extensions Semantic Forms, Semantic Drilldown, Semantic Calendar, and Semantic Google Maps. Moreover, the Programmer's guide to SMW has been updated to provide hints to useful resources and details on SMW's code style and naming conventions.
[view older news]
Note that a newline (<br>) is used to put the further results link on a separate line.
Parameters
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.
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.

