MediaPortal Windows Media Center
MediaPortal Wiki > Wiki Help > Contribute to Wiki > Transclude a Page

Transclude a Page

Was this page helpful?

    You do not need to duplicate content in the MediaPortal Wiki. In fact, you should try to avoid it as much as possible.

    Instead, you may transclude a page, or a section of a page in another page.  This means the contents of that page, or page section will display on the other page.  When the content is changed, or updated, the changes will then automatically display on any other page where it is transcluded.

    Procedure

    1. Press the Extensions button on the Edit Menu.
    2. Select Built In Extensions.
    3. Navigate to wiki.page (near the bottom).
    4. Enter the parameters you wish.

    Or you may use this format:

    {{ wiki.page{path: "1_MEDIAPORTAL_1/15_Customization/003_Startup/2_Green_Button_Startup"} }}
    

    or, for a section of a page:

    {{ wiki.page{path: "1_MEDIAPORTAL_1/20_Reference/Folders_and_Files", section: "TV-Server log files"} }}
    

    To include the heading of the source section:

    {{ wiki.page{path: "Wiki_Help/4_Contribute_to_Wiki/1_Style_Guide", section: "Spelling", show: 1,
    heading: "1"} }}
    

    Do not enter the full URL - omit the "http://wiki.team-mediaportal.com/".

    Note: In future we hope/plan to add Wiki.Page to the Insert option on the Edit Menu.

    Note: Although it is possible to transclude only a section of a page, MindTouch does not track changes to section Headings, so your transclusion will fail if you edit the section name. It is much safer to create a separate page for content that is transcluded, and transclude the whole page.

    Document all Transcluded pages

    When editing content, it is very important to know if the content also displays on other pages, so you do not edit it in a way that will not work on the other page(s).

    Add a Comment

    Thus, you should enter an editor's comment, which displays only in Edit mode.

    1. Type the text:  "Note: This page has been transcluded on: [link to the page]".
    2. Select the text.
    3. Select Insert > Comment.

    The comment will be highlighted in yellow and will not display when browsing the page.

    Tag the Page

    Whenever you transclude a page, change the stage:transclude tag to stage:transcluded, or remove the stage:transclude tag (if it exists) and add the tag stage:transcluded if it does not exist.

    This will automatically add the page to our list of transcluced pages on the To Do: Transclude page.




    Running the latest version?

    V1.7.0 - released April 2014
    Releasenews | Download
    Changelog
     | Requirements
    HTPC
    Team-MediaPortal
     
    About
    Contact |  Press
    Partners