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

Allow child publisher to inherit parent publisher theme #1383

Closed
1 of 2 tasks
jmcglone opened this issue Nov 30, 2017 · 2 comments
Closed
1 of 2 tasks

Allow child publisher to inherit parent publisher theme #1383

jmcglone opened this issue Nov 30, 2017 · 2 comments

Comments

@jmcglone
Copy link
Member

jmcglone commented Nov 30, 2017

Child publishers will need the ability to inherit its parent publisher's theme and database information in views. It will also need to be able to override those things to allow for custom branding at the child publisher level.

Currently we set a publisher's theme by passing a class to the view. For example in app/views/press_catalog/index.html.erb we do:

<% provide :page_title, @press.name %>
<% provide :page_class, 'press' %>

<div id="maincontent">
  <%= render 'press_catalog/press_results' %>

Which then adds the publisher's subdomain to the body, for example:

<body class="michigan">

For a child publisher to have its parent's and its own theme present, we will need to have both the child's subdomain and the parent publisher's subdomain added to the page. For example:

<body class="michigan gabii">
  • If a child publisher has a parent publisher, add its parent's subdomain across various views
  • The child publisher subdomain should always come second
@jmcglone
Copy link
Member Author

jmcglone commented Dec 6, 2017

If using publisher instead of sub-brand, none of this may be necessary.

@jmcglone jmcglone changed the title Allow sub-brands to override publisher themes Allow child publishers to inherit parent publisher themes Dec 7, 2017
@jmcglone jmcglone changed the title Allow child publishers to inherit parent publisher themes Allow child publisher to inherit parent publisher theme Dec 7, 2017
@jmcglone
Copy link
Member Author

jmcglone commented Dec 7, 2017

This ticket has been re-named and re-written to reflect the new child/parent publisher approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants