How can I combine slideshow and featured products on the same website page?
It is easy to create a page that has a slideshow but how to include the featured products on the same page?
Or I could use a default homepage, which has the child table grid “Products to be shown on website homepage”.
I’m using a self hosted ERPNext v10.1.35 so it is possible to modify server-side templates if needed.
I found a template file for website homepage which has a code block to generate the features products listing.
Can I inject this somehow to a custom web page? If yes, where should I put it?
I found the template for web page located at /home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/web_page/templates/web_page.html
But when I tried to include the code from the file mentioned in previous post I get a
Uncaught Server Exception
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 39, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 133, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 149, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 156, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 177, in build_page
html = frappe.get_template(context.template).render(context)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 1008, in render
return self.environment.handle_exception(exc_info, True)
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 780, in handle_exception
reraise(exc_type, exc_value, tb)
File “/home/frappe/frappe-bench/apps/frappe/frappe/./website/doctype/web_page/templates/web_page.html”, line 1, in top-level template code
{% extends “templates/web.html” %}
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/web.html”, line 1, in top-level template code
{% extends base_template_path %}
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/base.html”, line 69, in top-level template code
{% block content %}{% endblock %}
File “/home/frappe/frappe-bench/apps/frappe/frappe/./templates/web.html”, line 47, in block “content”
{%- block page_content -%}{%- endblock -%}
File “/home/frappe/frappe-bench/apps/frappe/frappe/./website/doctype/web_page/templates/web_page.html”, line 19, in block “page_content”
{% if homepage.products %}
File “/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/jinja2/environment.py”, line 430, in getattr
return getattr(obj, attribute)
UndefinedError: ‘homepage’ is undefined
How can I refer to an object that is in erpnext-app from frappe-app?
I got the same problem. when i try to include slideshow in home.html , the code gets completely ignored. How can i use slideshow in the default homepage?
please help !!