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

Hooks Documentation for LMS #1375

Open
r-prem opened this issue Mar 12, 2025 · 2 comments
Open

Hooks Documentation for LMS #1375

r-prem opened this issue Mar 12, 2025 · 2 comments

Comments

@r-prem
Copy link

r-prem commented Mar 12, 2025

There is an extensive tutorial on using hooks.py for the framework itself.
I would find it very helpful to also have a documentation about the hooks.py specifically for the LMS.
Especially in regards to custom JS and CSS files.

@pateljannat
Copy link
Collaborator

@r-prem, there are no special hooks for custom JS and CSS for LMS. Is there a specific problem you are facing here?

@r-prem
Copy link
Author

r-prem commented Mar 28, 2025

@pateljannat
Yeah, I'm trying to add a custom css file.
I edited the /home/frappe/frappe-bench/apps/lms/lms/hook.py file.
The lms55.css is my custom css. I tried to add it in two different places:

app_include_css = "/assets/lms/css/lms55.css"

# app_include_js = "/assets/lms/js/lms.js"

# include js, css files in header of web template
web_include_css = ["/assets/lms/css/lms55.css", "https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min2.css"]

The css is however not getting loaded in localhost:8080/lms but only in http://localhost:8000/app/lms (which is the desk app).

Here are the screenshots:

Image Image

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

No branches or pull requests

2 participants