ERPNext Main Webpage

Hi ,

I am trying to setup a website using ERP next. My requirement is to modify the main page with my own format (text, image etc). I tried locating the main page source code but with no success. Could someone help me in locating the main page source code (or how to fully modify the main web page).

thanks
Giri

The file you need to look at is frappe/frappe-bench/apps/erpnext/erpnext/templates/pages/home.html

if you want to edit a different file (recommended) this can be specified in website settings. Make a local copy of your edited file.

You can make changes to the homepage from website settings.

Create a custom frappe app and override base.html and web.html to completely change everything!

Check this
http://frappe.github.io/frappe/user/en/guides/portal-development/
https://frappe.io/docs/user/en/guides/portal-development

3 Likes

Thanks very much for the info @revant_one and @bglazier.

Hi,

thanks for the info, I am able to modify main page. Will I be able to run ā€˜bench updateā€™ even after modifying base.html (and other html files)?

Regards
Giri

Keep base.html and web.html in your appā€™s template directory. That will override default html templates.

4 Likes

Is it possible to make it site specific so that it works in a multi tenant setup as well?

Install the custom app on the specific site and it will affect only that site.

1 Like

Great :slight_smile:
Why didnā€™t I think of that before asking :frowning:

This is a great thing. Iā€™ve been hitting my head to the wall thinking how to see the source code of a web page from the website settings.
By the way, this guide portal development link doesnā€™t work anymore. I try to find if it has been transferred elsewhere.

You can also use my app

3 Likes

Ok, great, joelios!
I wished to edit the website code by myself but maybe no need with your app. Iā€™ll have a look!

Else you can fork my app and rework it for e.g.

2 Likes

Hello,
I had some user permission issues but got the app installed now. It replaced my homepage with ā€œlibracoreā€ though. Luckily I didnā€™t have anything special there anyway.

Do you have any ā€œguidebookā€ or similar anywhere? I am checking the different PageMaster settings but if any guidance would speed up to understand how the concept of this app has been built.

joelios, where would you prefer to get discussion regarding this app? So, far Iā€™m just getting errors with it, but Iā€™ll test further, e.g. trying to make a slideshow.

If I try to add an image, it says I have to first SAVE the slideshow.
If I try to save the slideshow first, it says

"Missing Fields

Mandatory fields required in Page Slideshow
Slider"

Letā€™s look with PM. Iā€™m sure i can help you :wink:

Now when upgrading our demo install from version 10 to 11, we are getting this error while trying to remove Pagemaster (it stops the upgrade, so it must be removed):

UnicodeDecodeError: ā€˜asciiā€™ codec canā€™t decode byte 0xdd in position 1: ordinal not in range(128)

This error comes when using these commands (we have tried all of them):
bench uninstall-app pagemaster
bench remove-app pagemaster
bench --site site1.local uninstall-app pagemaster

Python was updated to version 3 meanwhile the upgrade trial was going on. Python got ugraded but the ERP upgrade itself failed. The system is still version 10.

Try the following before running uninstall:

cd frappe-bench
source env/bin/activate
python -m pip install pip==9.0.3

Ok, made that and this came as result:

Installing collected packages: pip
Found existing installation: pip 19.0.1
Uninstalling pip-19.0.1:
Successfully uninstalled pip-19.0.1

Weā€™ve tried uninstall many times before this, so I couldnā€™t try it BEFORE uninstall.
Maybe we ask now, what should we do next, before we do somethingā€¦ :wink:

So, how should we proceed now?

The next step is to run the uninstall.