The lock object
The lock object represents the lock status of an object.
-
date
Returns the lock acquiring date. -
open
Returns the lock status. -
user
Returns the lock owner user.
date
Returns the lock acquiring date.
Syntax:
date → date
Returns:
The lock acquiring date.
Example:
This line outputs the lock date:
<#assign lock = liquidsite.findDocument("Section1/doc1").lock>
<p>The lock acquiring date is ${lock.date}.</p>
This will result in something like:
The lock acquiring date is 10-02-2005.
open
Returns the lock status.
Syntax:
open → boolean
Returns:
The lock status.
Example:
This code checks if a document is locked:
<#assign lock = liquidsite.findDocument("Section1/doc1").lock>
<#if lock.open>
user
Returns the lock owner user.
Syntax:
user → user
object
Returns:
The lock owner user.
Example:
To assign a lock user to a variable would be done with this code:
<#assign lock = liquidsite.findDocument("Section1/doc1")>
<#if lock.open>
<#assign user = lock.user>
