Properly obtain category titles and descriptions.
This commit is contained in:
parent
830b7fb23d
commit
48c9d9cdec
5 changed files with 34 additions and 28 deletions
|
|
@ -4,8 +4,12 @@ title: Applications
|
|||
---
|
||||
short_description: Standalone end-user-tools
|
||||
---
|
||||
sort_key: 3
|
||||
sort_key:
|
||||
---
|
||||
description: Applications are standalone end-user application. Although applications are written in Python, this is an implementation detail - you shouldn't ever be aware of this fact. Applications are installed and run the same way as any other end-user application on your computer.
|
||||
---
|
||||
hide_from_project: yes
|
||||
---
|
||||
category_type: application
|
||||
---
|
||||
important: yes
|
||||
|
|
|
|||
|
|
@ -9,3 +9,7 @@ sort_key: 4
|
|||
description: Description.
|
||||
---
|
||||
hide_from_project: yes
|
||||
---
|
||||
category_type: utility
|
||||
---
|
||||
important: yes
|
||||
|
|
|
|||
|
|
@ -25,26 +25,6 @@ label = Last on page
|
|||
description = reStructuredText
|
||||
type = rst
|
||||
|
||||
[fields.applications_title]
|
||||
label = Applications Category Title
|
||||
description = reStructuredText
|
||||
type = rst
|
||||
|
||||
[fields.applications_description]
|
||||
label = Applications Description
|
||||
description = reStructuredText
|
||||
type = rst
|
||||
|
||||
[fields.utilities_title]
|
||||
label = Utilities Category Title
|
||||
description = reStructuredText
|
||||
type = rst
|
||||
|
||||
[fields.utilities_description]
|
||||
label = Applications Description
|
||||
description = reStructuredText
|
||||
type = rst
|
||||
|
||||
[fields.gutter]
|
||||
label = Gutter
|
||||
description = reStructuredText
|
||||
|
|
|
|||
|
|
@ -11,9 +11,12 @@ order_by = maturity, name
|
|||
label = Title
|
||||
type = string
|
||||
|
||||
[fields.sort_key]
|
||||
label = Sort order
|
||||
type = sort_key
|
||||
[fields.category_type]
|
||||
label = Category type
|
||||
type = select
|
||||
choices = application, utility
|
||||
choice_labels = Application, Utility
|
||||
width = 1/4
|
||||
|
||||
[fields.short_description]
|
||||
label = Short description
|
||||
|
|
@ -32,4 +35,9 @@ type = rst
|
|||
[fields.hide_from_project]
|
||||
label = Hide from Project page?
|
||||
type = boolean
|
||||
width = 1/4
|
||||
|
||||
[fields.important]
|
||||
label = Is this a category featured on the Project page?
|
||||
type = boolean
|
||||
width = 1/4
|
||||
|
|
@ -30,12 +30,17 @@
|
|||
{% endfor %}
|
||||
<div class="row">
|
||||
<div class="important-category">
|
||||
{% set important_categories = site.query('/', alt=this.alt) %}
|
||||
{% for important_category in important_categories %}
|
||||
{% for category in site.query(important_category.path, alt=this.alt).filter((F.category_type == "application").and(F.important == True)) %}
|
||||
<div class="important-title">
|
||||
<h2><a href="{{ '/project/applications'|url(alt=this.alt) }}">{{ this.applications_title }}</a></h2>
|
||||
<h2><a href="{{ category|url(alt=this.alt) }}">{{ category.title }}</a></h2>
|
||||
</div>
|
||||
<div class="important-description">
|
||||
{{ this.applications_description }}
|
||||
{{ category.short_description }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<div class="important-projects">
|
||||
{% set important_projects = site.query('/project', alt=this.alt) %}
|
||||
{% for important_project in important_projects %}
|
||||
|
|
@ -49,12 +54,17 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="important-category">
|
||||
{% set important_categories = site.query('/', alt=this.alt) %}
|
||||
{% for important_category in important_categories %}
|
||||
{% for category in site.query(important_category.path, alt=this.alt).filter((F.category_type == "utility").and(F.important == True)) %}
|
||||
<div class="important-title">
|
||||
<h2><a href="{{ '/project/utilities'|url(alt=this.alt) }}">{{ this.utilities_title }}</a></h2>
|
||||
<h2><a href="{{ category|url(alt=this.alt) }}">{{ category.title }}</a></h2>
|
||||
</div>
|
||||
<div class="important-description">
|
||||
{{ this.utilities_description }}
|
||||
{{ category.short_description }}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
<div class="important-projects">
|
||||
{% set important_projects = site.query('/project', alt=this.alt) %}
|
||||
{% for important_project in important_projects %}
|
||||
|
|
|
|||
Loading…
Reference in a new issue