How do I do routing and use render_template()?
Hi @archt,
Please check the post.
Also check the reference: Using Html Templates In Javascript
I hope this helps.
Thank You!
Its not clear,can you please elaborate more?
frappe.render_template()
is a function used for rendering HTML templates in your custom applications or scripts. It allows you to generate HTML content dynamically by merging data with an HTML template. This function is often used in the context of web routing to display dynamic web pages.
Okay but how do we use the function,in which folder to put it in and folder structure and routing?
If I can a sample code it would help…I nee custom dynamic web pages and forms.
I have one custom_script.js
in my custom app which is mapped in the hooks.py
file
in the app_include.js
from that file I try to access this custom_blog.html
but I’m getting the not found error.
here the Relative path
frappe-bench/apps/custom_app/custom_app/templates/includes/custom_app/custom_blog.html
Question:
How to access the HTML templates from the template folder?