menu
Logo
  • Warum azing?
  • Blog
  • Hilfe
DEarrow_drop_down
  • DE
  • EN
Suche in Checklisten
search
azing Logo DEarrow_drop_down
  • DE
  • EN
  • Warum azing?
  • Hilfe
2sxc
drive_folder_upload
  • homeChecklisten-Vorlagen
  • south
  • fiber_manual_recordZ: Internal Stuff for the 2sxc-Dev Team
  • south

folder_sharedIntegration with Other Platforms

  • homeChecklisten-Vorlagen
  • south
  • fiber_manual_recordZ: Internal Stuff for the 2sxc-Dev Team
  • south

folder_sharedIntegration with Other Platforms

Ordner und Checklisten

  • check_circle1.1 Basic Read-Integration
  • check_circle1.2 First Web APIs
  • check_circle1.3 First JS Integration
  • check_circle2.1 WebApis - Create Stateless and Stateful ControllerBase
  • check_circle2.2 Modify Insights Controller from 1.2 to use Stateless Base Controller
  • check_circle2.3 Implement EditController Load-Action
  • check_circle2.4 Implement EditController EntityPicker
  • check_circle2.5 Implement Link Resolve
  • check_circle3.0 ADAM integration WIP

Teile (0) expand_more

Teil-Dokumente werden als von anderen Checklisten wiederverwendet, sind aber nicht geeignet als Einstieg in eine Tätigkeit. Deshalb erscheinen sie weiter unten. Die Suche wird diese auch nicht anzeigen, ausser man sucht explizit nach Teilen. 

The goal is that js code can open 2sxc dialogs. The dialogs themselves won't work yet, because the APIs are missing, but that will be implemented later.

Get JS to load

  1. Define a folder where the 2sxc js etc. will be stored. I recommend /system/sxc/...
  2. Copy the latest js and dist folder into that
  3. Add script tags to the page to load the /js/2sxc.api.min.js and /dist/inpage/inpage.min.js - then verify that the page loads and includes these scripts

Tell the 2sxc JS its Context

Normally CMS pages containing 2sxc will have a meta-header with the name _jsApi. It would then pick up context information from there. You can either also add such a meta-header, or tell $2sxc in your own code the values it needs. To do this, do something like this:

$2sxc.env.load({
page: 2742,
rvt: '...', // this is your request verification token, if used
api: '/api/sxc/', // the api base path
uiRoot: '/system/sxc/`, // the path above the js/dist which contains everything
});

You should now have a loading $2sxc which has env-variables. You can check this by running this in the console:

$2sxc.env.api() // this should give you the api path you just added

Open Your First Dialog

To open a dialog you must first create an sxc-object containing some context-information (zone, app, etc.) and then run a command. The API is still work-in-progress. Put this in a script tag on your page, and replace the zone, app etc. IDs with real IDs which exist in your test-DB.

var sxc = $2sxc({ zoneId: 128, appId: 1364, pageId: 4427, moduleId: 9771 });
sxc.manage.run('app'); // this should open the app-administration
sxc.manage.run('edit', { entityId: 127298 }); // this would try to edit item 12798

If everything works, you should see the dialog trying to open - but also have a bunch of errors in the console because network requests will try to access the Web API which doesn't exist yet. 

Logo
Rechtliches | Inhalts-Copyright CC-BY 4.0
bug_reportFehler melden
  • info
  • Links
  • Rechte
code Teilen
code
URL in Zwischenablage kopiert.
Checkliste einbetten close
Kopieren Kopieren
Inhalts-Copyright

CC-BY 4.0

Übersetzungen

Keine

2sxc - Content Management for DNN & Oqtane Logo

2sxc - Content Management for DNN & Oqtane

QR-Code
azing.org/2sxc/r/mIOzj2G-
Anschauen & Verwenden

Öffentlich (nutzbar für jeden)

Bearbeiten & Verwalten

Standard (alle Mitglieder können bearbeiten)

Dieser Katalog verwendet ein einfaches Berechtigungsmodell, bei dem alle Mitglieder die selben Rechte haben. Für weitere Optionen, bitte Upgraden.

Hier siehst du die Beziehungen zwischen diesem Dokument und anderen.

Verwendet in (0)

Andere, die hierhin verweisen

Verwendet diese (0)

Andere, die in diesem Dokument verwendet werden

Wie es verwendet wird

Die Kategoriesierung verändert das Verhalten des Dokuments.

Dies ist ein normales Dokument, es wird normal angezeigt und erscheint in der Suche.

Typ

Das ist eine Checkliste. Listen werden zu Checkboxen umgewandelt.

Haben Sie etwas zu sagen?

Kommentieren Sie, um eine Diskussion zu beginnen oder eine Notiz zu machen
send

Bitte einloggen um zu chatten.

close

Durchsuche ganz Azing