Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#69] Update readme for disableEditButton #71

Merged
merged 1 commit into from
Nov 9, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/extras.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,15 @@ Custom field handles on CP edit forms will be visible in the dev enviroment.
## Front-end edit entry Links

When visiting an element URL on the front-end, an edit entry link to edit that element in the CP will be present in the lower left hand corner. This will always be present in the dev environment regardless of logged-in state or permissions.

In order to prevent these links from being cached by Blitz (or simply to remove it from any site), `^v5.0.4` adds a boolean `disableEditButton` option to the module config which prevents the `Edit Entry` links from being output. The default value is `false` but can be changed in a project’s `config/viget.php` to `true` or `!App::devMode()`:

```php
<?php

use craft\helpers\App;

return [
'disableEditButton' => !App::devMode(), // default is false
];
```