-
Notifications
You must be signed in to change notification settings - Fork 1
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
define variables needed in the header template #247
Conversation
Any template instantiated by SSP code will not have defined our variables.
Quality Gate passedIssues Measures |
Exactly what I thought after seeing all these tweaks.
Duplicated how? As far as I can tell, the use line would change, that's it.
So, instead of changing the use line, add a functionality to do the tweaks on the template object? I think the extended object idea is better. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The advantage of the extended object idea is that you don't accidentally forget to add these two lines everywhere. I'll approved, but it isn't the cleanest way. Maintenance headaches await.
There's a hard boundary between modules, such that you can't call code from one module to the other. It may be possible to do it in this repo, but outside of a module, but my PHP isn't strong enough to think of all the required details. I'd welcome anyone to step in and clean this up for me. |
I note you said "I'll approve" but yet you didn't. Change of heart? |
Doh, my mistake. You did. |
Fixed
theme_color_scheme
andanalytics_tracking_id
)Note: It may be possible to reduce this code duplication by defining our own Template class, inherited from
SimpleSAML\XHTML\Template
, but I think that even that would have to be duplicated once for each module. Perhaps it could be extracted to our ssp-utilities repo.