Help talk:Embedded format

From semantic-mediawiki.org
Jump to: navigation, search
Please note

Talk pages on this wiki should primarily be used to address possible mistakes as well as missing and superseded information in the documentation.
In case you are seeking support concerning individual questions, please have a look at this page.
The Semantic MediaWiki user mailing list is always a good idea for seeking help.

Please note

Archived pages can be accessed here.

Contents

Thread titleRepliesLast modified
Embed page section412:25, 2 November 2017
This page is in the SMW news feed620:12, 26 January 2017
Sorting pages015:08, 3 July 2015
View more news on seperate line000:21, 26 November 2013
"True" is not true...102:10, 29 October 2012

Embed page section

Hi,
I can't embed a page section like Help:Embedded_format#Remarks using # as an acnhor to a specific section. I also tried numbering sections using <span id="xxx"> etc., and it doesn't work.
Is that normal or is there a trick I don't know?
Thanks,

Loman87 (talk)15:36, 31 October 2017

I am not absolutely up to speed with this extension but I believe it is only possible to embed pages as such while the contents of these pages that should be shown can be controlled with the <includeonly> and <noinclude> tags.

[[kgh]] (talk)22:32, 31 October 2017
Edited by another user.
Last edit: 10:41, 1 November 2017

Thanks for your answer. I'll try using <includeonly> and <noinclude> tags, but I am not sure thaht will be suitable for my needs.
I would like to extract page sections and show them in another page. There is an extension to do this via API but seems not to work with the anchor #. However I'll do other tries. Bye!

Loman87 (talk)10:14, 1 November 2017

There is the Labeled Section Transclusion extension which may perhaps be of help here. Also you could move the "Remarks" section to another page and when just search for this one. Manual transclusion can be done by with {{:Refarms to MyPage}}. I am not sure if this is something you would like to do since it comes with more editing effort and requires a more advanced "audience".

[[kgh]] (talk)10:47, 1 November 2017

Yes, maybe Labeled Section Transclusion extension could be of help, I have to try.

My need is to transclude sections marked with <div> or <span>, since in my pages, sections have a specific ID that I need to maintain. The id= attribute is parsed by mediawiki like an ordinary section heading, so I guessed it wouldn't be too much difficult to transclude ids instead of sections titles. I am going to write in the Labeled Section Transclusion extesion discussion page for other information.

Thanks again!

Loman87 (talk)12:25, 2 November 2017
 
 
 
 

This page is in the SMW news feed

Because this page is being added to Category:News item (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 Wilson00: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 ?

Christian9212: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: https://www.semantic-mediawiki.org/wiki/Special:Ask/-5B-5BNews-20date::%2B-5D-5D-20-5B-5Blanguage-20code::en-5D-5D/format%3Dfeed/sort%3Dnews-20date/order%3Ddesc/searchlabel%3DAtom/type%3Datom/title%3DSemantic-20MediaWiki-20%E2%80%93-20news/description%3DLatest-20news-20from-20semantic-2Dmediawiki.org/page%3Dfull/offset%3D0

(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 Wilson03:07, 26 January 2017

ok - investigating ...

Christian9208: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. :|

[0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1076
[1] https://github.com/SemanticMediaWiki/SemanticMediaWiki/pull/1455
[2] https://sandbox.semantic-mediawiki.org/wiki/Lorem_ipsum_3

[[kgh]] (talk)19: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)20: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)19: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?

Ad Strack van Schijndel (talk)15: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?

Thanks

Wade.courtney (talk)00: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-11-20 15:2112:58, 21 October 2012

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

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