frappe-portallisted
Install: claude install-skill prilk-consulting/frappe-agent-kit
# Portal & Website Development
## Usage
Use this skill when:
- Exposing a DocType on the customer/supplier portal (list + detail pages)
- Choosing between WebsiteGenerator and the portal-list pattern
- Portal access control (`has_website_permission`, `portal_users`)
- Extending existing ERPNext portal pages without forking templates
- Debugging "portal page shows nothing" or PDF-generation hangs
## Two patterns for exposing DocTypes
| Pattern | When | Setup |
|---------|------|-------|
| **A: WebsiteGenerator** | Publishable content (Blog Post, Web Page) | `has_web_view=1`, controller extends `WebsiteGenerator`, requires `route` field |
| **B: Portal List** *(recommended for transactions)* | Sales Order, Invoice, any user-owned document | `get_list_context()` in controller module; no `has_web_view` |
### Pattern A: WebsiteGenerator
- Set `has_web_view = 1` on the DocType, controller extends `WebsiteGenerator`
- Requires a `route` field; each document gets its own URL
- Template file named after the doctype (`.html`) inside the doctype folder's `templates` directory
- Override `get_context(context)` for template variables
### Pattern B: Portal List (recommended for transaction documents)
```python
# In the DocType controller module (my_doctype.py)
def get_list_context(context=None):
return {
"show_sidebar": True,
"show_search": True,
"no_breadcrumbs": True,
"title": _("My Documents"),
"get_list": get_filtered_list,
"