From 0a8be8c54bf11585a83d6c80705150be8db51c8a Mon Sep 17 00:00:00 2001 From: Micha Hobert Date: Mon, 27 Jan 2025 09:31:29 +0100 Subject: [PATCH] Update guides/plugins/apps/administration/add-cms-element-via-admin-sdk.md --- .../apps/administration/add-cms-element-via-admin-sdk.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guides/plugins/apps/administration/add-cms-element-via-admin-sdk.md b/guides/plugins/apps/administration/add-cms-element-via-admin-sdk.md index 554e1fd3e..559217bd8 100644 --- a/guides/plugins/apps/administration/add-cms-element-via-admin-sdk.md +++ b/guides/plugins/apps/administration/add-cms-element-via-admin-sdk.md @@ -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 @@ -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.