Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {% for siteId in groupSiteIds %}
- {% if siteId == entry.siteId %}
- // currentSite = entry.siteId
- {% else %}
- // not the current site
- {% endif %}
- {% endif %}
- $event->rules[] = [
- 'pattern' => 'form-builder/elements/<action:>/<id:d+>/<siteHandle:w+>',
- 'route' => 'form-builder/element/<action>',
- 'defaults' => [
- 'id' => null,
- 'siteHandle' => Craft::$app->getSites()->getPrimarySite()->handle,
- 'action' => 'index'
- ]
- ];
- public function actionEditEntry(string $sectionHandle, int $entryId = null, int $draftId = null, int $versionId = null, string $siteHandle = null, Entry $entry = null): Response
- if ($siteHandle !== null) {
- $variables['site'] = Craft::$app->getSites()->getSiteByHandle($siteHandle);
- if (!$variables['site']) {
- throw new NotFoundHttpException('Invalid site handle: '.$siteHandle);
- }
- }
Add Comment
Please, Sign In to add comment