Skip to content

Commit

Permalink
Update guides/plugins/apps/administration/add-cms-element-via-admin-s…
Browse files Browse the repository at this point in the history
…dk.md
  • Loading branch information
Isengo1989 authored and jleifeld committed Jan 29, 2025
1 parent d4053ec commit 0a8be8c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ import 'regenerator-runtime/runtime';
import { location } from '@shopware-ag/meteor-admin-sdk';

// Only execute extensionSDK commands when
// it is inside a iFrame (only necessary for plugins when using Shopware version below 6.7)
// it is inside an iFrame (only necessary for plugins when using Shopware version below 6.7)
if (location.isIframe()) {
if (location.is(location.MAIN_HIDDEN)) {
// Execute the base commands
Expand All @@ -73,7 +73,7 @@ This is the main file, which is executed first and functions as the entry point.
::: info
The steps below are only necessary for Shopware versions below 6.7.
:::
Start with `if(location.isIframe())` to make sure only content used inside iFrames is loaded. While the SDK is used in apps and plugins, this check ensures the code is executed in the right place.
Start with `if(location.isIframe())` to make sure only content used inside iFrames is loaded. While the SDK is used in apps and plugins, this check ensures the code is executed in the right place. Since 6.7 the SDK is always executed in an iFrame when using the `meteor-app` folder and therefore the check is not necessary.

Next you need `if(location.is(location.MAIN_HIDDEN))` to **load the main commands**, which are defined in the `mainCommands.ts` file. This will only be used to load logic, but not templates into the Administration.

Expand Down

0 comments on commit 0a8be8c

Please sign in to comment.