How to add custom CSS and Javascript to Item Group Webpages?

254 views
Skip to first unread message

Aditya Duggal

unread,
Jan 30, 2014, 10:19:24 AM1/30/14
to erpnext-dev...@googlegroups.com, iiita....@gmail.com
Hi,

We are currently outsourcing the website work from a new developer so that he could make a website from within erpnext. Now the problem is that all webpages have the ability to add custom CSS and javascript but the webpages which are generated from Item Groups are only in HTML, is there a way to add the custom CSS and javascript to the Item Group pages as well.



Anand Doshi

unread,
Jan 31, 2014, 3:23:53 AM1/31/14
to Aditya Duggal, erpnext-dev...@googlegroups.com, iiita....@gmail.com
Hi Aditya,

As an immediate solution, you can use global CSS field available via Website > Style Settings.

Best,
Anand Doshi.
> --
> Note:
>
> If you are posting an issue,
> 1. We should be able to replicate it at our end. So please give us
> as much information as you can. Please see it from the point of
> view of the person receiving the communication.
> 2. Paste your code at http://pastebin.com or http://gist.github.com
> and send only the URL via email
> 3. For sending images, use http://imgur.com or other similar
> services. Do not send images as attachments. Links are good.
> Same goes for any file you are going to send.
>
> End of Note
> ---
> You received this message because you are subscribed to the Google
> Groups "ERPNext Developer Forum" group.
> To unsubscribe from this group and stop receiving emails from
> it, send an email to erpnext-developer...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>

Aditya Duggal

unread,
Jan 31, 2014, 5:15:35 AM1/31/14
to erpnext-dev...@googlegroups.com, Aditya Duggal, iiita....@gmail.com
Is it not possible to add the same custom script and javascript options which are available in the normal webpages. This would help us in getting a good website up and working otherwise there are chances that the whole thing might just get stuck since the work is being done by a separate developer.

Anand Doshi

unread,
Feb 2, 2014, 1:33:10 AM2/2/14
to ERPNext Developer's Forum, Aditya Duggal, Puneet Verma
Hi Aditya,

As of now this option is not available, since they are not individual pages, but are generated using a common template.

But as a workaround, you can still use the global CSS to do what you want with the styling, since Global CSS is available for all pages on your website.

So say, you want to change the look of the grid list in your Item Group page, then you can apply css styles on search-list class and its children.

For javascript, you can use the global script option in Website > Website Script to bind events.

Please check if this works out. 

Thanks,
Anand.

PS: Ver 4 already has the ability to completely override existing templates, so a developer won't be limited by the restrictions of existing template. Hopefully, this should allow you to do any magic you want with your website :D

To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.

rushabh

unread,
Feb 5, 2014, 12:24:13 PM2/5/14
to erpnext-dev...@googlegroups.com, Aditya Duggal, Puneet Verma
Aditya,

I would caution against excessive theming until version 4.

In version 4, we will allow you to add Bootstrap Themes like in http://bootswatch.com/ (not in the first release but soon)

So you can use bootstrap themes directly that are responsive and platform friendly.

best,
Rushabh


On Sunday, February 2, 2014 12:03:10 PM UTC+5:30, Anand Doshi wrote:
Hi Aditya,

Reply all
Reply to author
Forward
0 new messages