How to fetch Custom file, In custom app. Ex: bench/apps/frappe-action/template/pages/pages.index

WhatsApp Image 2024-02-16 at 5.57.45 PM

How do l fetch data from here,
How do I call it.
inside---- apps/frappe-action/template/pages/pages.index

Also tried in console but getting Error, like Frappe is not defined. Check screen shot.

UncaughtReferenceError: frappe is not defined in custom page inside custom app www folder.

I have the same problem, I don’t know how to solve it?

If I create a page using Page List from Desk. A page is being created inside the directory:

module_name/page/sample_page/sample_page.html
This same page now can be accessed through the following URL.
https://example.com/app/sample-page

On this page frappe.get_route(); or any other frappe properties/elements are accessible

But when I’m trying to create sample page in custom app www folder and run frappe.get_route(); the following error shows in console:

app_name/module_name/www/sample_page.html

https://example.com/app_name/sample-page

UncaughtReferenceError: frappe is not defined