Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Footer graphic not shown when _footerContent is empty #22

Open
swashbuck opened this issue Nov 4, 2024 · 0 comments
Open

Footer graphic not shown when _footerContent is empty #22

swashbuck opened this issue Nov 4, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@swashbuck
Copy link
Contributor

swashbuck commented Nov 4, 2024

Subject of the issue

On a content object page, the footer graphic is not shown if there is no footer content value (ex. "_footerContent": ""). This can be remedied by adding a space character to _footerContent for the content object, but the solution is not ideal.

In our use case, we 1) do not want a footer displayed on the menu and 2) only want a footer logo displayed on pages. If _footerContent is not set here, then the plugin tries to inherit from course.json. In our case, there is no content defined for the menu in course.json, so nothing appears on content object pages.

if (footer._footerContent) return;
// Inherit from the course.json
footer._footerContent = footerCourseConfig._footerContent;
footer._horizontalAlignment = footerCourseConfig._horizontalAlignment;
footer._verticalAlignment = footerCourseConfig._verticalAlignment;
footer._graphic = footerCourseConfig._graphic;
footer._classes = footerCourseConfig._classes;

Your environment

  • Footer 2.1.0

Steps to reproduce

  1. Enable footer in course.json.
  "_footer": {
    "_isEnabled": true
  },
  1. Enable footer in contentObjects.json for a topic.
"_footer": {
  "_isEnabled": true,
  "_footerContent": "",
  "_horizontalAlignment": "center",
  "_verticalAlignment": "center",
  "_graphic": {
    "src": "assets/logo.svg",
    "alt": "Logo",
    "_orientation": "horizontal"
  }
},

Expected behaviour

  • The menu should not display any footer content.
  • The page should display a footer logo.

Actual behaviour

Nothing appears in the footer for both the menu and the page.

Use cases

Use case 1

The menu and pages both have the client logo and a short copyright statement. (NO ISSUES)

Use case 2

The menu does not display a footer. Pages have a footer with both a logo and statement. (NO ISSUES)

Use case 3

The menu does not display a footer. Pages have a footer with just a logo. (REQUIRES a space characer for footerContent)

Use case 4

The menu has the client logo as well as a lengthy disclaimer in the footer. Pages in the course should only have the client logo. (REQUIRES a space characer for footerContent)

@swashbuck swashbuck added the bug Something isn't working label Nov 4, 2024
@swashbuck swashbuck self-assigned this Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant