634 lines
No EOL
15 KiB
HTML
634 lines
No EOL
15 KiB
HTML
<!-- title: Web Page -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="dev-header">
|
|
|
|
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
|
Version 6.x.x</a>
|
|
|
|
|
|
<a class="btn btn-default btn-sm" href="https://github.com/frappe/frappe/tree/develop/frappe/website/doctype/web_page"
|
|
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p><b>Table Name:</b> <code>tabWeb Page</code></p>
|
|
|
|
|
|
Page to show on the website
|
|
|
|
|
|
<h3>Fields</h3>
|
|
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%">Sr</th>
|
|
<th style="width: 25%">Fieldname</th>
|
|
<th style="width: 20%">Type</th>
|
|
<th style="width: 25%">Label</th>
|
|
<th style="width: 25%">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr class="info">
|
|
<td>1</td>
|
|
<td ><code>section_title</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
Title
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>2</td>
|
|
<td class="danger" title="Mandatory"><code>title</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Title
|
|
<p class="text-muted small">
|
|
Title / headline of your page</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>3</td>
|
|
<td ><code>show_title</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Show Title
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>4</td>
|
|
<td ><code>slideshow</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Slideshow
|
|
<p class="text-muted small">
|
|
Begin this page with a slideshow of images</p>
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/frappe/current/models/website/website_slideshow">Website Slideshow</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>5</td>
|
|
<td ><code>cb1</code></td>
|
|
<td class="info">
|
|
Column Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>6</td>
|
|
<td ><code>page_name</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Page Name
|
|
<p class="text-muted small">
|
|
Page url name (auto-generated)</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>7</td>
|
|
<td ><code>published</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Published
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>8</td>
|
|
<td ><code>sb1</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
Content
|
|
<p class="text-muted small">
|
|
Page content</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>9</td>
|
|
<td ><code>main_section</code></td>
|
|
<td >
|
|
Text Editor</td>
|
|
<td >
|
|
Main Section
|
|
<p class="text-muted small">
|
|
Content in markdown format that appears on the main side of your page</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>10</td>
|
|
<td ><code>fold_10</code></td>
|
|
<td >
|
|
Fold</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>11</td>
|
|
<td ><code>custom_javascript</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
Custom Javascript
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>12</td>
|
|
<td ><code>insert_code</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Insert Code
|
|
<p class="text-muted small">
|
|
Add code as <script></p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>13</td>
|
|
<td ><code>javascript</code></td>
|
|
<td >
|
|
Code</td>
|
|
<td >
|
|
Javascript
|
|
|
|
</td>
|
|
<td>
|
|
<pre>Javascript</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>14</td>
|
|
<td ><code>custom_css</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
Custom CSS
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>15</td>
|
|
<td ><code>insert_style</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Insert Style
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>16</td>
|
|
<td ><code>css</code></td>
|
|
<td >
|
|
Code</td>
|
|
<td >
|
|
CSS
|
|
|
|
</td>
|
|
<td>
|
|
<pre>CSS</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>17</td>
|
|
<td ><code>section_break_17</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>18</td>
|
|
<td ><code>enable_comments</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Enable Comments
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>19</td>
|
|
<td ><code>text_align</code></td>
|
|
<td >
|
|
Select</td>
|
|
<td >
|
|
Text Align
|
|
|
|
</td>
|
|
<td>
|
|
<pre>Left
|
|
Center
|
|
Right</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>20</td>
|
|
<td ><code>column_break_20</code></td>
|
|
<td class="info">
|
|
Column Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>21</td>
|
|
<td ><code>parent_web_page</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Parent Web Page
|
|
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/frappe/current/models/website/web_page">Web Page</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>22</td>
|
|
<td ><code>parent_website_route</code></td>
|
|
<td >
|
|
Read Only</td>
|
|
<td class="text-muted" title="Hidden">
|
|
Parent Website Route
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>23</td>
|
|
<td ><code>idx</code></td>
|
|
<td >
|
|
Int</td>
|
|
<td >
|
|
Priority
|
|
<p class="text-muted small">
|
|
0 is highest</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>24</td>
|
|
<td ><code>template_path</code></td>
|
|
<td >
|
|
Small Text</td>
|
|
<td >
|
|
Template Path
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr class="info">
|
|
<td>25</td>
|
|
<td ><code>sb2</code></td>
|
|
<td >
|
|
Section Break</td>
|
|
<td >
|
|
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>26</td>
|
|
<td ><code>description</code></td>
|
|
<td >
|
|
Small Text</td>
|
|
<td >
|
|
Description
|
|
<p class="text-muted small">
|
|
Description for search engine optimization.</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>27</td>
|
|
<td ><code>header</code></td>
|
|
<td >
|
|
Text</td>
|
|
<td >
|
|
Header
|
|
<p class="text-muted small">
|
|
HTML for header section. Optional</p>
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<h3>Controller</h3>
|
|
<h4>frappe.website.doctype.web_page.web_page</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>WebPage</b></h3>
|
|
|
|
<p style="padding-left: 30px;"><i>Inherits from frappe.website.website_generator.WebsiteGenerator</i></h4>
|
|
|
|
<div class="docs-attr-desc"><p></p>
|
|
</div>
|
|
<div style="padding-left: 30px;">
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="add_hero" href="#add_hero" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>add_hero</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Add a hero element if specified in content or hooks.
|
|
Hero elements get full page width.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="add_index" href="#add_index" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>add_index</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Add index, next button if <code>{index}</code>, <code>{next}</code> is present.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="check_for_redirect" href="#check_for_redirect" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>check_for_redirect</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_context" href="#get_context" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_context</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_dynamic_context" href="#get_dynamic_context" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_dynamic_context</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>update context from <code>.py</code> and load sidebar from <code>_sidebar.json</code> if either exists</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_feed" href="#get_feed" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_feed</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_static_content" href="#get_static_content" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_static_content</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="render_dynamic" href="#render_dynamic" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>render_dynamic</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="set_breadcrumbs" href="#set_breadcrumbs" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>set_breadcrumbs</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Build breadcrumbs template (deprecated)</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="set_metatags" href="#set_metatags" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>set_metatags</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="set_title_and_header" href="#set_title_and_header" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>set_title_and_header</b>
|
|
<i class="text-muted">(self, context)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Extract and set title and header from content or context.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate" href="#validate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="frappe.website.doctype.web_page.web_page.check_broken_links" href="#frappe.website.doctype.web_page.web_page.check_broken_links" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
frappe.website.doctype.web_page.web_page.<b>check_broken_links</b>
|
|
<i class="text-muted">()</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h4>Linked In:</h4>
|
|
<ul>
|
|
|
|
|
|
<li>
|
|
|
|
|
|
<a href="https://frappe.github.io/frappe/current/models/website/web_page">Web Page</a>
|
|
|
|
</li>
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
<!-- autodoc -->
|
|
<!-- jinja -->
|
|
<!-- static --> |