-
Notifications
You must be signed in to change notification settings - Fork 150
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
views: optional index page registration #2952
base: master
Are you sure you want to change the base?
Conversation
kpsherva
commented
Jan 8, 2025
- closes Homepage: rework to show current communities CERNDocumentServer/cds-rdm#204
ab347a7
to
c54e335
Compare
invenio_app_rdm/theme/views.py
Outdated
@@ -43,8 +43,10 @@ def create_blueprint(app): | |||
template_folder="templates", | |||
static_folder="static", | |||
) | |||
|
|||
blueprint.add_url_rule(**create_url_rule(routes["index"], default_view_func=index)) | |||
if app.config["RDM_FRONTPAGE"]: |
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.
may i ask what the use case is to make the /
route optional?
what will be rendered then as default if it is not configured?
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.
I would like to have custom view context, see
https://github.com/CERNDocumentServer/cds-rdm/pull/311/files#diff-1a67a7df3625c50413611bb5279e5be98b8b9b870aff748a0dde81062a0e3ceb
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.
For what it's worth, I've left a comment on the CDS PR, suggesting a different approach for overriding views.
I can add this approach to docs, unless, we want to find a better approach so we're not limiting ourselves in the current 2-tuple format for the route values.
return window.MathJax?.typeset(); | ||
} | ||
}; | ||
if (document.body.dataset.invenioConfig) { |
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.
This should always be there. @anikachurilova worked on this.
What was the issue?
I fail to understand what this PR is changing. Do you mind adding a very brief explanation? |