Help talk:Embedded format

Jump to: navigation, search

The claim that "SMW will take care that embedded articles do not import their semantic annotations, so these need not be treated specifically" seems to now be true as of SMW (in my experience, it was not the case with previous versions of SMW that I have used, <= 1.5.2).

However, it should be noted that properties set with {{#set:}}et al. will get upwardly transcluded unless they are specifically wrapped in <noinclude> tags. Please do not change that behavior, though, I think this is excellent! It allows certain properties to be upwardly transcluded (which in some rare cases is quite desirable), but defaults to not doing that. Clear and thoughtful reasons this should NOT happen appear here --Alex 19:51, 9 February 2011 (CET)


The above behavior has been reported and acknowledged as a bug, not a feature. Therefore, for the time being, you must either wrap your {{#set functions in noinclude tags or mark them as silent annotations, e.g., [[Property::value| ]] --Alex 19:30, 10 February 2011 (CET)

unwanted category from transcluded template

Let's say PAGE A uses a template (TEMPLATE A) with named parameters to create the contents of the page, as is customary for most SMW wiki's. Let's say TEMPLATE A has the category definition (CATEGORY A's). If PAGE B contains an SMW query with the embedded result format, CATEGORY A's will be transcluded into PAGE B and PAGE B will now be a part of CATEGORY A's.

How can this be avoided (without manually defining categories per page)?


This is a very useful output format, but I just noticed one limitation to its use. If this format is selected in a query enabled by Semantic Forms (and quite possibly in regular inline queries, too), the embedded page may exclude some or all of its inline queries (=queries which are part of the source page). Cavila 12:17, 18 November 2011 (CET)

Heiya Cavila, thanks for pointing this out to us. I will have this checked. Perhaps its a bug or it is not possible (=limitation) Cheers --[[kgh]] 23:37, 18 November 2011 (CET)
Just for the sake of completeness (in 2011 I added a note to the documentation but never responded here), this is a limitation that is due to the specific functionality of the magic word PAGENAME (which no longer refers to the intended page once it is embedded somewhere else). Since many users enable queries (of the type {{#ask: [[Some property::{{PAGENAME}}]] }}) through the use of templates, it seems to be a fairly significant limitation. Will this ever be fixed? Cavila (talk) 12:54, 20 November 2013 (CET)


Thread titleRepliesLast modified
This page is in the SMW news feed621:12, 26 January 2017
Sorting pages016:08, 3 July 2015
View more news on seperate line001:21, 26 November 2013
"True" is not true...103:10, 29 October 2012

This page is in the SMW news feed

Because this page is being added to Category:News item, it's being included in the news feed and from there into Planet Wikimedia]. I guess this is because each news item in the list is being added to this category. Is there some way to avoid this? Not that it really matters that it's in the Planet, but it's an interesting question from the point of view of using SMW as well. Thanks!

Sam Wilson01:34, 25 January 2017

This page already existed; it was just a correction within the page which has been done. Nothing new. I have checked that the page has no category assigned, and I have set category = Result formats. Does it help ?

Christian9213:13, 25 January 2017

No, it's because this page has values for Property:News date (which it shouldn't, because it's not a news item), and so is being picked up by this feed:

(This was also sort of raised above but with no resolution.)

I guess the Template:Tl template could be changed to not transclude property definitions when in the Help namespace. Or something. :-) I'm not sure.

Sam Wilson04:07, 26 January 2017

ok - investigating ...

Christian9209:30, 26 January 2017

Wow, it is interesting to see where the news items from Semantic MediaWiki are propagated. There was an issue for this two years ago: [0] with [1] as resolution served starting with SMW 2.4.0. So if I understand correctly from the example given [2] the parameter "embedonly" has been extended not prevent annotations via embedding the result on a page. So what irritates me is that we are still seeing the annotation even after I added the parameter to the query. This one works on sandbox. :|


[[kgh]] (talk)20:45, 26 January 2017

This cannot be done with in-text annotation but for annotations via set and subobject only. So tweaks are required here too.

[[kgh]] (talk)21:12, 26 January 2017

There is also another issue. The translation source as well as the clean clone of the translation source are fed into the feed. This should not happen for the latter. Here on this wiki I added another helper property "Is duplicate page" to be able to distinguish between the two. I guess I will for legacy reasons have to add some magic to the news template to prevent the "News date" property from being used. I will have a look.

[[kgh]] (talk)20:51, 26 January 2017

Sorting pages

This is indeed a very useful output format, but with another limitation. Sorting pages can only be done based on properties of the pages themselves. And that is not always useful. For example: if pages are slides in a slideshow the slideshow would be separate pages in which the slides are bundled and put in a certain order. For example using multi-instance templates and subobjects. In that case the sorting information is in the subobjects and not in the pages themselves. Then you would want to have something like this:

{{#ask: [[Is in slideshow::aSlideshow]] (querying the subobjects for this slideshow)
| mainlabel=-
| Has slide=
| sort=Slide number
| format=embedded

Here the result of the query would be a number of slides if put in a list or table, but is a number of slideshows in this case because the embedded format doesn't look at the printouts.

Would it be possible to change the format so that any list of pages that is the result of the query (including the printouts) could be embedded?

AdSvS (talk)16:07, 3 July 2015

View more news on seperate line

No matter what I did, I could never get the search label to show up on a separate line.

What's the trick?


Wade.courtney (talk)01:21, 26 November 2013

"True" is not true...

As of MW 1.19.2 and SMW 1.7.1, setting "embedonly=true" will have no effect. You must use "embedonly=yes" to remove the headings.

Alex (talk) 2017-04-26 21:4413:58, 21 October 2012

Heiya Alex, thank you for noticing. I just amended the documentation. Cheers

[[kgh]] (talk)02:59, 29 October 2012