"Page Variables" refers to variables used in spurtCMS LMS template that handles data associated with the Pages entity.

Here's a description of each of the page variables and its purpose.

        1) Page details Group&page         - {{range .SpaceDetails}} {{end}}
        2) Get page only             - {{if ne .Pages.Id 0}} {{end}}
        3) Get SubPage             - {{range .Pages.SubPageData}} {{end}}
        4) Route                 - {{.Permalink}}
        5) Page Title                 - {{.Pages.Title}}
        6) SubPage Title             - {{.Title}}
        7) Group                 - {{.Group.Title}}
        8) Group -> pages loop        - {{range .Group.PageData}} {{end}}
        9) Group - > pages -> sub        - {{range .SubPageData}} {{end}}

       
Explanation:

.SpaceDetails: Returns an array containing pages and groups.
.Pages.Id: Returns the ID of the page.
.Pages.SubPageData: Returns an array containing subpages.
.Pages.Title: Provides the title of the page.
.Permalink: Represents the permalink or route of the page.
.Group.Title: Provides the title of the group.

Example :

{{range .SpaceDetails}}
	
		{{if ne .Pages.Id 0}} // get page only

			{{.Pages.Permalink}}

			{{.Pages.Title}}

			{{.Pages.Title}}

			{{range .Pages.SubPageData}}
	
				{{.Permalink}}

				{{.Title}}

			{{end}}

		{{else}}
					
			{{.Group.Title}}
		
		{{end}}

		{{if .Group.PageData}}
		
			{{range .Group.PageData}}
			
				{{.Permalink}}
			
				{{.Title}}

				{{range .SubPageData}}

					{{.Permalink}}
			
					{{.Title}}
	
				{{end}}
			
			{{end}}
		
		{{end}}

	{{end}}

spurtCMS Templates