HTML Templates v5 broken

I am trying to install the new HTML Template version 5:
https://community.d2l.com/brightspace/kb/articles/26484-html-templates-version-5-0

So far, I have unzipped both the (1) template package and (2) course package, and have done so both (A) locally on my hard drive and (B) within a course shell via Manage Files (as per the documentation)
https://community.desire2learn.com/d2l/le/content/14263/Home

In all four cases, when I open the sample HTML pages the links to images, css, js, etc. all appear to be broken. All I see is plain text.

I am not an LMS administrator at my institution, but I thought that it would at least work locally or that the course package would work in a course shell.

Am I doing anything wrong? Alternatively, will the code snippets provided in the Elements submodule of the D2L Learning Centre work with previous templates like version 3?

https://community.desire2learn.com/d2l/le/content/14263/Home?itemIdentifier=D2L.LE.Content.ContentObject.ModuleCO-201207

Answers

  • Jennifer.W.973
    Jennifer.W.973 Posts: 357 🎆
    edited September 5

    @david.a The V5 templates are meant to be uploaded to your institution's Public Files area and not to individual courses. The reason why the CSS is not working is because the paths to the assets are dependent on the shared folder that is in Public Files.

    When you unzipped the shared.zip file after uploading it to Manage Files, it should have created two folders: D2L and HTML-Template-Library. The shared folder does not exist in this scenario, so it needs to be removed from the HTML code on each page. Replace /shared with .. and it should work for the sample pages that were imported using the course.zip file. You can do this with a batch find and replace among all files in a text/code editor like Sublime or BBEdit.

    For example, change this:
    <script type="module" src="/shared/D2L/Courseware_HTML_Templates/V5/latest/_assets/js/global.min.js"></script>

    To this:
    <script type="module" src="../D2L/Courseware_HTML_Templates/V5/latest/_assets/js/global.min.js"></script>

    For the HTML pages in the HTML-Template-Library folder from the shared.zip file (rather than the sample pages in from the course.zip file), looks like you will need to add ../../.. to get those pages to work.

  • Yildiz.N.829
    Yildiz.N.829 Posts: 31 🌱

    Does anyone know if the V3 Templates will get discontinued? If they get discontinued, will we still be able to add Bootstrap or jQuery scripts to HTML pages or will there be limitations to what we can do in the HTML pages? For example, when creating a Unit, the HTML is much more restricted compared to the HTML Document, which can be added within a Unit.

    Thanks!