mirror of
https://github.com/tiennm99/hugoDocs.git
synced 2026-10-15 02:17:05 +00:00
Update sectionvars.md
This commit is contained in:
1 parent
295ccb4632
commit
3416ba80d5
1 file changed
+7
-7
@@ -1,20 +1,20 @@
|
|||||||
.CurrentSection
|
.CurrentSection
|
||||||
: the page's current section. The value can be the page itself if it is a section or the homepage.
|
: The page's current section. The value can be the page itself if it is a section or the homepage.
|
||||||
|
|
||||||
.InSection $anotherPage
|
.InSection $anotherPage
|
||||||
: whether the given page is in the current section. Note that this will always return false for pages that are not either regular, home or section pages.
|
: Whether the given page is in the current section. Note that this will always return false for pages that are not either regular, home or section pages.
|
||||||
|
|
||||||
.IsAncestor $anotherPage
|
.IsAncestor $anotherPage
|
||||||
: whether the current page is an ancestor of the given page. Note that this method is not relevant for taxonomy lists and taxonomy terms pages.
|
: Whether the current page is an ancestor of the given page. Note that this method is not relevant for taxonomy lists and taxonomy terms pages.
|
||||||
|
|
||||||
.IsDescendant $anotherPage
|
.IsDescendant $anotherPage
|
||||||
: whether the current page is a descendant of the given page. Note that this method is not relevant for taxonomy lists and taxonomy terms pages.
|
: Whether the current page is a descendant of the given page. Note that this method is not relevant for taxonomy lists and taxonomy terms pages.
|
||||||
|
|
||||||
.Parent
|
.Parent
|
||||||
: a section's parent section or a page's section.
|
: A section's parent section or a page's section.
|
||||||
|
|
||||||
.Section
|
.Section
|
||||||
: the [section](/content-management/sections/) this content belongs to. **Note:** For nested sections, this is the first path element in the directory, for example, `/blog/funny/mypost/ => blog`.
|
: The [section](/content-management/sections/) this content belongs to. **Note:** For nested sections, this is the first path element in the directory, for example, `/blog/funny/mypost/ => blog`.
|
||||||
|
|
||||||
.Sections
|
.Sections
|
||||||
: the [sections](/content-management/sections/) below this content.
|
: The [sections](/content-management/sections/) below this content.
|
||||||
Reference in new issue
Block a user