Skip to content

Update preview mode docs #8877 - #2111

Open
alhambrav wants to merge 11 commits into
craftersoftware:masterfrom
alhambrav:update-preview-mode
Open

Update preview mode docs #8877#2111
alhambrav wants to merge 11 commits into
craftersoftware:masterfrom
alhambrav:update-preview-mode

Conversation

@alhambrav

@alhambrav alhambrav commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Ticket reference or full description of what's in the PR

Update preview mode docs craftersoftware/craftercms#8877

Summary by CodeRabbit

  • Documentation
    • Improved readability of Freemarker and Groovy variable reference tables.
    • Clarified how to detect Preview Mode using the modePreview variable.
    • Added Groovy and FreeMarker usage examples for Preview Mode checks.
    • Expanded Preview Mode security guidance with practical scripting examples.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The documentation converts variable tables to reStructuredText list tables, updates modePreview descriptions, and adds Groovy and FreeMarker examples for preview-only logic.

Changes

Preview mode documentation

Layer / File(s) Summary
Variable reference updates
source/includes/freemarker-variables.rst, source/includes/global-groovy-variables.rst
Variable tables now use list-table syntax. The modePreview descriptions explain preview-mode checks.
Preview mode examples
source/reference/api/groovy-java-api.rst, source/reference/modules/engine.rst
The documentation shows Groovy and FreeMarker conditions that use modePreview.
Estimated code review effort: 1 (Trivial) ~5 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: sumerjabri

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description includes the required heading and provides a clear summary with the issue reference.
Title check ✅ Passed The title clearly identifies the primary change: updating preview mode documentation.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@alhambrav
alhambrav marked this pull request as ready for review August 10, 2026 13:54
@alhambrav
alhambrav requested a review from sumerjabri August 10, 2026 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant