Dogwood Comprehensive theming , text template

233 views
Skip to first unread message

Avadhut Sonawane

unread,
Jun 29, 2016, 8:30:08 AM6/29/16
to General Open edX discussion
Hi All,

I am running dogwood release, I have added a comprehensive theme and I have successfully customized the LMS's header and footer.

I wanted to customized the default login/signup page ("lms/template/student_account/..").

Link: https://github.com/edx/edx-platform/blob/named-release/dogwood.rc/lms/templates/student_account/login_and_register.html
 
I have copied student_account directory into "theme_directory/lms/templates/".

The login_and_register.html file is override and served from theme directory.

But it looks like the only mako files can be override rightnow, the internal text template files are still served from the "edx-platform/lms/templates/student_account/..".

e.g. Link: https://github.com/edx/edx-platform/blob/named-release/dogwood.rc/lms/templates/student_account/login.underscore

Text template files are included here https://github.com/edx/edx-platform/blob/named-release/dogwood.rc/lms/templates/student_account/login_and_register.html#L22.

Is it possible to serve the internal text templates files from theme directory or will have to customized them in edx-platform itself?

Thanks
Avadhut

Juan Jose Miranda

unread,
Aug 19, 2016, 8:52:55 PM8/19/16
to General Open edX discussion
I have the same problem!
We need to modify underscore templates but its served form edx-platform core.
Any advice about this?

Thanks,
JJMiranda

Andy Armstrong

unread,
Aug 22, 2016, 9:46:23 AM8/22/16
to edx-...@googlegroups.com
Hi Avadhut and Juan,

This is a great question. Unfortunately, the Underscore templates are bundled into the JavaScript files that need them, so comprehensive theming as it works today won't be able to override them. It seems that we'd need to rebuild all the JavaScript bundles per theme, so that comprehensive theming can build re-bundled files per theme with the appropriate Underscore templates included. An alternative would be not to bundle the files, but that is a performance problem (at least until we support HTTP/2).

There is some documentation in our developer documentation about how we use RequireJS Text to bundle Underscore files: 


For now, I think the best you can do is fork the code as you suggest.

 - Andy

--
You received this message because you are subscribed to the Google Groups "General Open edX discussion" group.
To view this discussion on the web visit https://groups.google.com/d/msgid/edx-code/23bcf86d-5016-48d0-989d-c1ee51471198%40googlegroups.com.



--

Andy Armstrong

edX | UI Architect  | an...@edx.org  

141 Portland Street, 9th floor

Cambridge, MA 02139

http://www.edx.org

http://www.e-learn.nl/media/blogs/e-learn/edX_Logo_Col_RGB_FINAL.jpg?mtime=1336074566
Reply all
Reply to author
Forward
0 new messages