How to change the home page of edx ?

4,739 views
Skip to first unread message

raj singhania

unread,
Aug 20, 2014, 2:35:18 AM8/20/14
to edx-...@googlegroups.com

  Hello all
   I want to change the look and feel of my homepage . I don't get which html file do i need to change .
   I got files for other pages but unable to locate the very first (home page) page.
 
   Please also tell in which file (view file) the logic is written to display the courses ?


 

Marceau C.

unread,
Aug 20, 2014, 4:22:54 AM8/20/14
to edx-...@googlegroups.com


You should use Stanford Theming to change your homepage.

If you want to manually update the code, the main pages are:
LMS:
edx-playform/lms/templates/main.html
CMS:
edx-playform/cms/templates/base.html
edx-playform/cms/templates/widgets/header.html

rajsinghaniaful .

unread,
Aug 25, 2014, 7:09:54 AM8/25/14
to edx-...@googlegroups.com
Thanks for your response

I tried standford theme .
It looks same like the edx home page .
is there any restrictions for changing the front page ? ( as edx is using mako template )

Han Su Kim

unread,
Aug 26, 2014, 11:55:43 AM8/26/14
to edx-...@googlegroups.com
I think what you are looking for is a front end for edX.  

What you see at edx.org before you actually log into the student dashboard is actually a Drupal based website.  

rajsinghaniaful .

unread,
Aug 26, 2014, 12:35:56 PM8/26/14
to edx-...@googlegroups.com
OK so how can i add a same page on my local instance of edx?
please mention if there is any documentation for it .

Or  how did the drupal page is added there do you have any idea?
please provide more info  if you have .
Thank you


Han Su Kim

unread,
Aug 26, 2014, 12:47:44 PM8/26/14
to edx-...@googlegroups.com
There is no documentation as it's not a part of the edx-platform itself, using the theme's like Stanford is though.  Our drupal website is entirely outside of edx-platform and depending on where you click just forwards the requests onto edx-platform, but in itself an entirely separate website on it's own with it's own servers.  It's merely one way, there are tons of other ways, including just creating your own static website that will forward the person onto the right URL that you want.  I hope that answers your question.  

rajsinghaniaful .

unread,
Sep 1, 2014, 1:08:41 AM9/1/14
to edx-...@googlegroups.com
 thank you for your response .

i need more help from you .
I want to enable the navigations links , like courses, contact us, about , Institutes etc how can i do this ?
i was trying to enable them .i set the    'USE_MICROSITES' and  'ENABLE_MKTG_SITE' to true

My Problems:

1: On the  localhost/register three  links (How it works, Courses, Schools ) are visible but they are disabled i can't click on it . How can i enable them ?

2: On the home page it shows the  Internal Server Error . how can i resolve them ?
this is the log generated by home page



Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: ABOUT
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: JOBS
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: PRIVACY
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: TOS
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: FAQ
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: COURSES
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: CONTACT
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: PRESS
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: WHAT_IS_VERIFIED_CERT
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: ROOT
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: HONOR
Sep  1 10:44:03 aakash-desktop [service_variant=lms][root][env:sandbox] ERROR [aakash-desktop  16148] [exceptions.py:9] - Uncaught exception from <class 'django.core.handlers.wsgi.WSGIHandler'>
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/util/cache.py", line 51, in _decorated
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/branding/views.py", line 36, in index
    return redirect(settings.MKTG_URLS.get('ROOT'))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/shortcuts/__init__.py", line 81, in redirect
    if '/' not in to and '.' not in to:
TypeError: argument of type 'NoneType' is not iterable
Sep  1 10:44:03 aakash-desktop [service_variant=lms][django.request][env:sandbox] ERROR [aakash-desktop  16148] [base.py:215] - Internal Server Error: /
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/utils/decorators.py", line 91, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/common/djangoapps/util/cache.py", line 51, in _decorated
    response = view_func(request, *args, **kwargs)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/branding/views.py", line 36, in index
    return redirect(settings.MKTG_URLS.get('ROOT'))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/shortcuts/__init__.py", line 81, in redirect
    if '/' not in to and '.' not in to:
TypeError: argument of type 'NoneType' is not iterable
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: ROOT
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: HOW_IT_WORKS
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: COURSES
Sep  1 10:44:03 aakash-desktop [service_variant=lms][edxmako.shortcuts][env:sandbox] WARNING [aakash-desktop  16148] [shortcuts.py:56] - Cannot find corresponding link for name: SCHOOLS
Sep  1 10:44:03 aakash-desktop [service_variant=lms][gunicorn.error][env:sandbox] ERROR [aakash-desktop  16148] [glogging.py:219] - Error handling request
Traceback (most recent call last):
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/gunicorn/workers/sync.py", line 126, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 241, in __call__
    response = self.get_response(request)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 179, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/edx/app/edxapp/edx-platform/lms/djangoapps/static_template_view/views.py", line 69, in render_500
    return HttpResponseServerError(render_to_string('static_templates/server-error.html', {}))
  File "/edx/app/edxapp/edx-platform/common/djangoapps/edxmako/shortcuts.py", line 104, in render_to_string
    return template.render_unicode(**context_dictionary)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/template.py", line 452, in render_unicode
    as_unicode=True)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 807, in _render
    **_kwargs_for_callable(callable_, data))
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 839, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/mako/runtime.py", line 865, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/tmp_80eFNmako/main.html.py", line 253, in render_body
    __M_writer(filters.decode.utf8(self.body()))
  File "/tmp/tmp_80eFNmako/static_templates/server-error.html.py", line 40, in render_body
    platform_name=u"<em>{}</em>".format(platform_name=settings.PLATFORM_NAME)
IndexError: tuple index out of range

ja...@veritasu.com

unread,
Sep 1, 2014, 11:30:50 PM9/1/14
to edx-...@googlegroups.com

You need to mimic the layout that's there in "edx-platform/lms/templates/" 
for eg: the about page is in "edx-platform/lms/templates/static_templates/about.html" so you should have an "about.html" on "templates/static_templates/" in your theme directory or else it will give you error.

The best way to get started is to clone the stanford edx-theme https://github.com/Stanford-Online/edx-theme and start customising it.

rajsinghaniaful .

unread,
Sep 4, 2014, 5:06:01 AM9/4/14
to edx-...@googlegroups.com
thanks jalal

i have already installed standford theme and doing these changes on that .
according to standford theme i have created the  theme folder in the edxapp directory .
edxapp/standford/template
in this  (edxapp/standford/template ) directory i put the static_template folder which contains all  the  required static file .


still it is not working . please suggest where i am wrong .

jell m

unread,
Sep 4, 2014, 7:44:39 AM9/4/14
to edx-...@googlegroups.com
Are you getting the same error?

try the below steps

1. Clone https://github.com/Stanford-Online/edx-theme to /edx/app/edxapp/themes/
2.  rename _default.scss to edx-theme.scss
3.   Set  "USE_CUSTOM_THEME": true " and THEME_NAME": "edx-theme" in lms.env.json
4. paver devstack  lms




rajsinghaniaful .

unread,
Sep 5, 2014, 3:01:18 AM9/5/14
to edx-...@googlegroups.com
hello jalal thanks for your response

i don't have problem in installation .
Standford theme is working fine, i  have problem in enabling the navigation links like
(How it works, Courses, Schools,
Terms of Service  Privacy Policy  Honor Code  Copyright  Careers  Contact  Help  )

where i need to configure so that these pages are accessible ?

jell m

unread,
Sep 5, 2014, 5:23:32 AM9/5/14
to edx-...@googlegroups.com
Ok great.

You need to have the exact directory structure as it is on the edx-platform/lms

consider the page Terms of Service, it is located in edx-platform/lms/templates/static_templates/tos.html  .

create directory static_templates/ in /<THEMEDIR>/templates/

copy tos.html from lms to static_templates/  

This will fix the error 500 on Terms of Service Page.

Repeat the same procedure for the other pages.


Melvin

unread,
Sep 11, 2014, 4:49:41 AM9/11/14
to edx-...@googlegroups.com
Hello all,
i do the ff:

1. Clone https://github.com/Stanford-Online/edx-theme to /edx/app/edxapp/themes/
2.  rename _default.scss to edx-theme.scss
3.   Set  "USE_CUSTOM_THEME": true " and THEME_NAME": "edx-theme" in lms.env.json

after doing this? how can run the edx to implement the theme changes?

Melvin

unread,
Sep 11, 2014, 4:51:25 AM9/11/14
to edx-...@googlegroups.com
Hi i do the ff.

1. Clone https://github.com/Stanford-Online/edx-theme to /edx/app/edxapp/themes/
2.  rename _default.scss to edx-theme.scss
3.   Set  "USE_CUSTOM_THEME": true " and THEME_NAME": "edx-theme" in lms.env.json

but how can i run the edx to implement and see the theme changes?  do i need to build again like this
  • cd /var/tmp/configuration/playbooks && sudo ansible-playbook -c local ./edx_sandbox.yml -i "localhost,"
    

Melvin

unread,
Sep 11, 2014, 4:55:21 AM9/11/14
to edx-...@googlegroups.com

do this to customize your home pages html
cd /edx/app/edxapp/edx-platform/lms/templates and see the index.html

Melvin

unread,
Sep 11, 2014, 5:17:22 AM9/11/14
to edx-...@googlegroups.com
i got it worked now! thank you!

John Liu

unread,
Sep 21, 2014, 6:09:39 PM9/21/14
to edx-...@googlegroups.com
If you use a custom theme like edx-theme, you will need to copy the static_templates directory like this:

sudo cp /edx/app/edxapp/edx-platform/lms/templates/static_templates /edx/app/edxapp/themes/edx-theme/templates

THEN, you will need to append "theme-" to the name of every file within the static_templates directory like this:

sudo mv about.html theme-about.html

This should resolve the "THERE HAS BEEN A 500 ERROR ON THE XXX SERVERS" error on the navigation links.

Cheers -J

hsin han

unread,
Sep 22, 2014, 3:12:32 AM9/22/14
to edx-...@googlegroups.com
Hi, does any one know which codes and how to modify to achieve "Schools & Parters" like https://www.edx.org/schools-partners

thanks,
Hsin Han

John Liu於 2014年9月22日星期一UTC+8上午6時09分39秒寫道:

bse11

unread,
Jul 21, 2016, 11:51:19 AM7/21/16
to General Open edX discussion
i have the same problem, anybody know the solution?

пятница, 5 сентября 2014 г., 11:01:18 UTC+4 пользователь raj singhania написал:
Reply all
Reply to author
Forward
0 new messages