Slideshow and featured products

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?


{% if homepage.products %}
  <div class='featured-products-section' itemscope itemtype="">
  	<h5 class='featured-product-heading'>{{ _("Featured Products") }}</h5>
  	<div class="featured-products">
  		<div id="search-list" class="row" style="margin-top:40px;">
  			{% for item in homepage.products %}
  			<a class="product-link" href="{{ item.route|abs_url }}">
  				<div class="col-sm-4 col-xs-4 product-image-wrapper">
  					<div class="product-image-img">
  						<!-- thumbnail not updated, and used as background image in item card -->
  						{{ product_image_square(item.image) }}
  					<div class="product-text" itemprop="name">{{ item.item_name }}</div>
  			{% endfor %}
  	<div class="text-center padding">
  		<a href="{{ homepage.products_url or "/products" }}" class="btn btn-primary all-products">
  			{{ _("View All Products") }}</a></div>
  {% endif %}

I found the template for web page located at

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/”, line 39, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/”, line 133, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/”, line 149, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/”, line 156, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/”, 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/”, 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/”, 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/”, 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?


Hi, were you able to resolve?

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 !!