Skip to content

Commit

Permalink
improve getPageContext() example
Browse files Browse the repository at this point in the history
  • Loading branch information
zspitzer committed Nov 12, 2024
1 parent a4a8792 commit 778edd3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docs/03.reference/01.functions/getpagecontext/_examples.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
```luceescript+trycf
writeDump(getPageContext());
echo("Click to expand");
pc = getPageContext();
dump(var=pc, label="PageContext", expand=false);
dump(var=pc.getCFMLFactory(), label="CFMLFactory", expand=false);
dump(var=pc.getCFMLFactory().getEngine(), label="Engine",expand=false);
if( listFirst(server.lucee.version,".") lte 5)
dump(var=pc.getCFMLFactory().getConfig(), label="Config",expand=false);
else
dump(var=pc.getCFMLFactory().getConfigServer(), label="ConfigServer",expand=false);
dump(var=pc.getCFMLFactory().getScopeContext(), label="ScopeContext",expand=false);
```
2 changes: 2 additions & 0 deletions docs/03.reference/01.functions/valueref/function.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
---
title: ValueRef
id: function-valueref
related:
- tag-function
---

creates a reference to a UDF that acts like a simple value.

0 comments on commit 778edd3

Please sign in to comment.