Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Fachgruppenwebseite Metadaten
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
fginfo
Fachgruppenwebseite Metadaten
Commits
96b724c9
You need to sign in or sign up before continuing.
Verified
Commit
96b724c9
authored
2 years ago
by
Jake
Browse files
Options
Downloads
Patches
Plain Diff
added getters.html
parent
227aecb2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
theme/templates/macros/getters.html
+53
-0
53 additions, 0 deletions
theme/templates/macros/getters.html
with
53 additions
and
0 deletions
theme/templates/macros/getters.html
0 → 100644
+
53
−
0
View file @
96b724c9
{%- macro category_by_name(catname, ignore_native = False) -%}
{%- if ignore_native -%}
{{- caller(null, sc.categories[catname], null) -}}
{%- else -%}
{%- for nativecat, catarticles in categories -%}
{%- if nativecat.name == catname -%}
{{- caller(nativecat, sc.categories[catname], catarticles) -}}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{%- endmacro -%}
{%- macro tag_by_name(tagname) -%}
{%- for nativetag, tagarticles in tags -%}
{%- if nativetag.name == tagname -%}
{%- if tagname in sc.categories -%}
{{- caller(nativetag, sc.categories[tagname], tagarticles) -}}
{%- else -%}
{{- caller(nativetag, None, tagarticles) -}}
{%- endif -%}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}
{%- macro article_by_slug(slug, lang) -%}
{%- for a in all_articles -%}
{%- if a.slug == slug and a.lang == lang -%}
{{- caller(a) -}}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}
{%- macro page_by_slug(slug, lang) -%}
{%- for p in pages -%}
{%- if p.slug == slug and p.lang == lang -%}
{{- caller(p) -}}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}
{%- macro article_or_page_by_slug(slug, lang) -%}
{%- for a in all_articles -%}
{%- if a.slug == slug and a.lang == lang -%}
{{- caller(a, "article") -}}
{%- endif -%}
{%- endfor -%}
{%- for p in pages -%}
{%- if p.slug == slug and p.lang == lang -%}
{{- caller(p, "page") -}}
{%- endif -%}
{%- endfor -%}
{%- endmacro -%}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment