Anonymous
Not logged in
Talk
Contributions
Create account
Log in
Publication Station
Search
Editing
Publisher:Beyond-Social
(section)
From Publication Station
Namespaces
Publisher
Discussion
More
More
Page actions
Read
Edit
History
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Transclusion === This transclusion function has been very helpful for the development of the BS wiki in a practical sense. It turned out to be a useful way to work with a Main Page that we wanted to structure and style, but therefore became quite fragile and difficult to read in terms of many html elements and strict break lines. Within this fragile structure, we wanted to include a few sections on the Main Page that would need curation and therefore writing access, such as the highlighted articles, the category selection and the list of upcoming events. By transcluding single pages into <div> elements on the Main Page, the Main Page can be edited by not touching the Main Page itself: the curated sections are edited in a set of other (normal) pages. To do this, we used standard wiki templates. In order to transclude a short 'about' description of the Beyond Social project on the Main Page, we used this template markup <pre>{{:About_Beyond_Social}} </pre> to include the page "About_Beyond_Social" into the Main Page. By default, this line trancludes the full page into the Main Page. But as we only wanted to have the first paragraph of the page, we added <noinclude> tags around the rest of the text. These no-inclusion tags mark which text should never be transluded into another page, and make sure that this text will still be visible when someone visits the page "About_Beyond_Social" itself. Another way to include a specific part of text is by using the <nowiki><includeonly></nowiki> tags. For us these tags were less useful, as these tags mark which text should be transcluded, but will make this text invisible when visiting the page itself. Visit the MediaWiki documentation pages to read more about on [https://www.mediawiki.org/wiki/Transclusion transclusion] and [https://www.mediawiki.org/wiki/Help:Templates templates]. A second type of transclusion that we wanted to include for the Main Page were the listings of recent user activity that are built-in wiki functions, such as recent files, new pages, wanted pages (red links) and listings of articles using the Editorial template. Some of these lists can be transcluded into other pages using standard wiki templates, such as the recent files list that can be queried like this: <pre>{{:Special:Newimages/12}} </pre> For the more specific lists that we wanted to use, such as a list of all the pages that use the Template:Editorial for example, we needed a few more transclusion options . MediaWiki software comes with many functions, but there is also a large amount of plugins available, called extensions, of which some are more stable then other. (See [https://www.mediawiki.org/wiki/Category:All_extensions this page] listing all available extensions in the MediaWiki database.) We decided to use an external plugin called [https://www.mediawiki.org/wiki/Extension:DynamicPageList_%28third-party%29 DynamicPageList] (DPL) that offers specific transclusion options to create lists of a specific category or query the last batch of activity from a special page such as all the pages that use the Template:Editorial. A DPL transclusion to do this looks like this: <pre><DPL> uses=Template:Editorial ordermethod=firstedit order=descending count=10 </DPL> </pre>
Summary:
Please note that all contributions to Publication Station are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
Publication Station:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation
Main navigation
Main page
Printmaking Studio
Print Studio
Dig. Publishing Studio
Namespaces
Grafiwiki
Random Page
Log in
Wiki tools
Wiki tools
Page tools
Page tools
User page tools
More
What links here
Related changes
Page information
Page logs