Skip to content

Avoid hard-coded module path in template #35

@donquixote

Description

@donquixote

The templates/collabora-online-full.html.twig template contains hard-coded paths in the urls to js and css files.

  <head>
    <script src="/modules/contrib/collabora_online/js/cool.js"></script>
    <link href="/modules/contrib/collabora_online/css/cool.css" rel="stylesheet" />
  </head>

This assumes that the module is in /modules/contrib/collabora_online, which is not guaranteed.
It also assumes that the base url is just /, which means Drupal is not installed in a subdirectory.

Instead, these urls should be composed from variables passed into the template.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions