lektor-website/content/docs/api/db/system-fields/gid/contents.lr

21 lines
404 B
Plaintext
Raw Normal View History

2015-12-25 22:53:37 +01:00
title: _gid
---
summary: A globally unique ID of the page.
---
type: sysfield
---
body:
The `_gid` is the MD5 hashed version of the page's [`_path`](../path/). This
is useful in situations where a stable ID is needed that follows a certain
format. For instance it can come in useful when a ID is needed for a DOM
element.
## Example
```html+jinja
<body class="page-{{ this._gid }}">
...
</body>
```