$templates


Template Properties

  • $template->id

    Get or set the template's numbered database ID.

  • $template->name

    Get or set the template's name.

  • $template->filename

    Get or set a template's filename, including path (this is auto-generated from the name, though you may modify it at runtime if it suits your need).

  • $template->label

    Optional short text label to describe Template.

  • $template->fieldgroup

    Get or set a template's Fieldgroup. Can also be used to iterate a template's fields.

  • $template->fields

    Syntactical alias for $template->fieldgroup. Use whatever makes more sense for your code readability.

  • $template->cacheTime

    Get or set the number of seconds this template's output should be cached (default is 0).

  • $template->childrenTemplatesID

    Get or set the template database ID that children of pages using this template default to. 0 is the default and indicates no selection. Set to -1 to disallow pages using this template from having children.

  • $template->allowPageNum

    Get or set whether pages using this template can have URL-based page numbers. Set to 1 for yes or 0 for no. Default is 0.

  • $template->urlSegments

    Get or set whether pages using this template can make use of URL segments. Set to 1 for yes or 0 for no. Default is 0.

  • $template->slashUrls

    Get or set whether pages using this template should have URLs that end with a slash. Set to 1 for yes or 0 for no. Default is 1.

  • $template->redirectLogin

    Get or set what should happen when a user attempts access to a page using this template, and they don't have access to. Set to 0 to show the 404 page, or 1 to redirect to the login page. Default is 0.

  • $template->protocol

    Get or set what protocol is required to access pages using this template. If the user attempts access from the wrong protocol, it will be redirected to the right protocol. Set to 0 to allow either HTTP or HTTPS. Set to 1 to allow HTTPS only. Set to -1 to allow HTTP only. Default is 0.