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_recordCustomize Templates and Content-Types
  • south

folder_sharedRazor Components / Templates

  • homeChecklisten-Vorlagen
  • south
  • fiber_manual_recordCustomize Templates and Content-Types
  • south

folder_sharedRazor Components / Templates

Ordner und Checklisten

  • check_circleRazorComponent - Migrate from Older Format
  • check_circleRazorComponent - Use new Hover TagToolbar

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. 

Notes: this assumes you now have 2sxc 10.24 or newer running. You can also just start with step one and reload the page, then fix issues step-by step.

Always Required

  1. Add this to the first line: @inherits ToSic.Sxc.Dnn.RazorComponent
    Note: no semicolon at the end (;). This first line to tells the compiler to use the new base class which enables new features and disables obsolete features. 
  2. Change any @Content.Toolbar to 
    this also applies to other dynamic objects that use .Toolbar
    1. @Edit.TagToolbar(Content) - recommended see this
    2. or @Edit.Toolbar(Content) (this behaves the same as the previous one)

Changes for Content-Lists

  1. Change all ListContent to Header
    The old name ListContent was always confusing, so in RazorComponents we changed it to Header and disabled the use of ListContent. 
  2. Change all ListPresentation or ListContent.Presentation to Header.Presentation

Changes for Data-Code (LINQ and List-Loops)

  1. Change all list-uses of AsDynamic(...) to AsList(...)
    Previously AsDynamic was used both for single-items as well as for lists. The compiler couldn't always figure out what to use, so you had to cast objects - which was nasty. Now you use AsList for lists, and AsDynamic for single items.
    See also AsDynamic(...) - Magic Objects and AsList(...) - Magic Lists
  2. If you ever cast to IEntity, use the new one on ToSic.Eav.Data.IEntity - see this
  3. If you ever had a DynamicEntity cast change that to dynamic - see this
  4. If you ever had to cast to IEnumerable, prefer... 
    to use, use 
    @using Dynlist = System.Collections.Generic.IEnumerable<dynamic>;
    to cast it - in the code it will look a bit like this:
    (person.Awards as Dynlist).Select(a => a.Name)

Changes to jQuery

For performance reasons jQuery isn't automatically included any more. If your code expects to use jQuery, make sure you tell DNN about it.

Changes to CustomizeData or CustomizeSearch

  1. Use Purpose instead of InstancePurpose
  2. The signature of CustomizeSearch has slightly different object types - see docs
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

If you already have a Razor template from before 2sxc 10.24 and wish to migrate to the new RazorComponent, here's how to do it.

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/9g6xRMrD
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 (2)

Andere, die hierhin verweisen

  1. Migrate to Conventions of 2sxc 11
  2. Migrate from SxcApiController to new ApiController in v10.25+
Verwendet diese (1)

Andere, die in diesem Dokument verwendet werden

  1. RazorComponent - Use new Hover TagToolbar
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