Help:Embedded format

From semantic-mediawiki.org
Jump to: navigation, search
Embedded format
Embed selected articles.
Available languages
deenzh-hans
Further Information
Provided by: Semantic MediaWiki
Added: 0.7
Removed: still supported
Requirements: none
Format name: embedded
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
yes
Authors: Markus Krötzsch
Categories: misc
Group:
Table of Contents

↓ INFO ↓

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

General

Parameter Type Default Description
source text empty Alternative query source
limit whole number 50 The maximum number of results to return
offset whole number 0 The offset of the first result
link text all Show values as links
sort list of texts empty Property to sort the query by
order list of texts empty Order of the query sort
headers text show Display the headers/property names
mainlabel text no The label to give to the main page name
intro text empty The text to display before the query results, if there are any
outro text empty The text to display after the query results, if there are any
searchlabel text ... further results Text for continuing the search
default text empty The text to display if there are no query results

Format specific

Parameter Type Default Description
embedformat text h1 The HTML tag used to define headings
embedonly yes/no no 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. yes), 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:

SMWCon Fall 2016 Program announced

September 9, 2016.

The program for SMWCon Fall 2016 in Frankfurt am Main, Germany (September 28-30, 2016) has now been announced. It is compiled from a variety of interesting talks and presentations about semantic wikis and related topics. The keynote will be held by Prof. Dr. Sören Auer of Fraunhofer Institute for Intelligent Analysis and Information Systems IAIS, Enterprise Information Systems. See all the details on the program pages for the tutorial day and the conference days.

All interested participants are encouraged to register at the ticketing site. Note that the slightly extended Early Bird registration period ends on September 14, 2016.

The conference is organised by German Institute for International Educational Research (DIPF) and Open Semantic Data Association (OSDA). It is kindly supported by Wikimedia Germany (WMDE) as well as ArchiXL.

For more information on this and the conference, see the SMWCon Fall 2016 homepage.

SMWCon Fall 2016 registration open

August 9, 2016. The registration for SMWCon Fall 2016 in Frankfurt am Main, Germany (September 28-30, 2016) is now open. All interested participants can now register at the ticketing site. Note that the Early Bird period ends on September 11, 2016.

The conference is organised by German Institute for International Educational Research (DIPF) and Open Semantic Data Association (OSDA). It is kindly supported by Wikimedia Germany (WMDE).

For more information on this and the conference, see the SMWCon Fall 2016 homepage. See also our Call for Contributions.

Semantic MediaWiki 2.4 released

July 9 2016. Semantic MediaWiki 2.4, the next feature version after 2.3, has now been released. This new version brings many enhancements and new features such as substantial improvements on how to handle multilingual content, providing more control on what data values may be stored validly (based on patterns) and on how data values may be displayed and formatted (e.g. units, precision). Also the maintenance scripts were extended to provide more features easing the work of the system administrators. Other improvements allow to select pages via ranges or with single values using comparators and placeholders. See also the release page for information on further improvements and new features. Additionally this version fixes a lot of bugs and brings stability and performance improvements. Automated software testing was further expanded to assure software stability. See the page Installation for details on how to install and upgrade.
[view older news]

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.

Limitations

You cannot use the embed format to embed a query from another page if that query relies on the magic word {{PAGENAME}}.



This documentation page applies to all SMW versions from 0.7 to the most current version.
      Other languages: dezh-hans

Help:Embedded format en 0.7