Skip to content

Commit

Permalink
docs for CmsContext.Block and Guid
Browse files Browse the repository at this point in the history
  • Loading branch information
iJungleboy committed May 10, 2024
1 parent 6b3c3f1 commit b57976f
Show file tree
Hide file tree
Showing 6 changed files with 179 additions and 12 deletions.
65 changes: 58 additions & 7 deletions docs/api/dot-net/ToSic.Sxc.Context.ICmsBlock.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,22 @@ <h5 class="offcanvas-title" id="tocOffcanvasLabel">Table of Contents</h5>

<h1 id="ToSic_Sxc_Context_ICmsBlock" data-uid="ToSic.Sxc.Context.ICmsBlock" class="text-break">
Interface ICmsBlock
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L6"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L16"><i class="bi bi-code-slash"></i></a>
</h1>

<div class="facts text-secondary">
<dl><dt>Namespace</dt><dd><a class="xref" href="ToSic.html">ToSic</a>.<a class="xref" href="ToSic.Sxc.html">Sxc</a>.<a class="xref" href="ToSic.Sxc.Context.html">Context</a></dd></dl>
<dl><dt>Assembly</dt><dd>ToSic.Sxc.dll</dd></dl>
</div>

<div class="markdown summary"></div>
<div class="markdown summary"><p>Information about the block - similar to a module.
The block is the 2sxc-internal definition of a unit of content.
In most cases each module has one block, but there are edge cases such as:</p>
<ul>
<li>modules which show the same block - different module-id, same block-id</li>
<li>modules showing multiple blocks such as inner-content.</li>
</ul>
</div>
<div class="markdown conceptual"></div>

<div class="codewrapper">
Expand All @@ -146,20 +153,61 @@ <h1 id="ToSic_Sxc_Context_ICmsBlock" data-uid="ToSic.Sxc.Context.ICmsBlock" clas



<h2 id="ToSic_Sxc_Context_ICmsBlock_remarks">Remarks</h2>
<div class="markdown level0 remarks"><p>Was added somewhere in 2sxc 13, but not documented/published till 2sxc 17.</p>
</div>


<h2 class="section" id="properties">Properties
</h2>


<a id="ToSic_Sxc_Context_ICmsBlock_Guid_" data-uid="ToSic.Sxc.Context.ICmsBlock.Guid*"></a>

<h3 id="ToSic_Sxc_Context_ICmsBlock_Guid" data-uid="ToSic.Sxc.Context.ICmsBlock.Guid">
Guid
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L34"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>The Guid of this Block - corresponds to the EntityGuid in 2sxc which stores the block.</p>
</div>
<div class="markdown level1 conceptual"></div>

<div class="codewrapper">
<pre><code class="lang-csharp hljs">Guid Guid { get; }</code></pre>
</div>





<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.guid">Guid</a></dt>
<dd></dd>
</dl>




<h4 class="section" id="ToSic_Sxc_Context_ICmsBlock_Guid_remarks">Remarks</h4>
<div class="markdown level1 remarks"><ul>
<li>Added in v17.08.</li>
<li>If exported and re-imported, this Guid will stay the same, so it's a better reference than the Id.</li>
</ul>
</div>




<a id="ToSic_Sxc_Context_ICmsBlock_Id_" data-uid="ToSic.Sxc.Context.ICmsBlock.Id*"></a>

<h3 id="ToSic_Sxc_Context_ICmsBlock_Id" data-uid="ToSic.Sxc.Context.ICmsBlock.Id">
Id
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L12"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L25"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>The ID of this Block</p>
<div class="markdown level1 summary"><p>The ID of this Block - corresponds to the EntityId in 2sxc which stores the block.</p>
</div>
<div class="markdown level1 conceptual"></div>

Expand All @@ -180,6 +228,9 @@ <h4 class="section">Property Value</h4>



<h4 class="section" id="ToSic_Sxc_Context_ICmsBlock_Id_remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>If exported and re-imported, this ID will change, so consider using the Guid instead.</p>
</div>



Expand All @@ -188,10 +239,10 @@ <h4 class="section">Property Value</h4>

<h3 id="ToSic_Sxc_Context_ICmsBlock_IsRoot" data-uid="ToSic.Sxc.Context.ICmsBlock.IsRoot">
IsRoot
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L18"><i class="bi bi-code-slash"></i></a>
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L40"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>Determines if this is the root block.
<div class="markdown level1 summary"><p>Determines if this is the root block, meaning it's the main block inside a module.
Will be true in most cases, but false on inner-content</p>
</div>
<div class="markdown level1 conceptual"></div>
Expand Down Expand Up @@ -221,7 +272,7 @@ <h4 class="section">Property Value</h4>
</article>

<div class="contribution d-print-none">
<a href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L6" class="edit-link">Edit this page</a>
<a href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsBlock.cs/#L16" class="edit-link">Edit this page</a>
</div>


Expand Down
35 changes: 35 additions & 0 deletions docs/api/dot-net/ToSic.Sxc.Context.ICmsContext.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,41 @@ <h2 class="section" id="properties">Properties
</h2>


<a id="ToSic_Sxc_Context_ICmsContext_Block_" data-uid="ToSic.Sxc.Context.ICmsContext.Block*"></a>

<h3 id="ToSic_Sxc_Context_ICmsContext_Block" data-uid="ToSic.Sxc.Context.ICmsContext.Block">
Block
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsContext.cs/#L59"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>Information about the current block, similar to the module but a bit different.</p>
</div>
<div class="markdown level1 conceptual"></div>

<div class="codewrapper">
<pre><code class="lang-csharp hljs">ICmsBlock Block { get; }</code></pre>
</div>





<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="ToSic.Sxc.Context.ICmsBlock.html">ICmsBlock</a></dt>
<dd></dd>
</dl>




<h4 class="section" id="ToSic_Sxc_Context_ICmsContext_Block_remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>Added ca. v13, but not documented/published till v17.</p>
</div>




<a id="ToSic_Sxc_Context_ICmsContext_Culture_" data-uid="ToSic.Sxc.Context.ICmsContext.Culture*"></a>

<h3 id="ToSic_Sxc_Context_ICmsContext_Culture" data-uid="ToSic.Sxc.Context.ICmsContext.Culture">
Expand Down
35 changes: 35 additions & 0 deletions docs/api/dot-net/ToSic.Sxc.Context.ICmsModule.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,41 @@ <h2 class="section" id="properties">Properties
</h2>


<a id="ToSic_Sxc_Context_ICmsModule_Block_" data-uid="ToSic.Sxc.Context.ICmsModule.Block*"></a>

<h3 id="ToSic_Sxc_Context_ICmsModule_Block" data-uid="ToSic.Sxc.Context.ICmsModule.Block">
Block
<a class="header-action link-secondary" title="View source" href="https://github.com/2sic/2sxc/blob/develop/Src/Sxc/ToSic.Sxc/Context/CmsContext/ICmsModule.cs/#L46"><i class="bi bi-code-slash"></i></a>
</h3>

<div class="markdown level1 summary"><p>Information about the root block in the module.</p>
</div>
<div class="markdown level1 conceptual"></div>

<div class="codewrapper">
<pre><code class="lang-csharp hljs">ICmsBlock Block { get; }</code></pre>
</div>





<h4 class="section">Property Value</h4>
<dl class="parameters">
<dt><a class="xref" href="ToSic.Sxc.Context.ICmsBlock.html">ICmsBlock</a></dt>
<dd></dd>
</dl>




<h4 class="section" id="ToSic_Sxc_Context_ICmsModule_Block_remarks">Remarks</h4>
<div class="markdown level1 remarks"><p>Added ca. v13, but not documented/published till 2sxc 17.</p>
</div>




<a id="ToSic_Sxc_Context_ICmsModule_Id_" data-uid="ToSic.Sxc.Context.ICmsModule.Id*"></a>

<h3 id="ToSic_Sxc_Context_ICmsModule_Id" data-uid="ToSic.Sxc.Context.ICmsModule.Id">
Expand Down
9 changes: 8 additions & 1 deletion docs/api/dot-net/ToSic.Sxc.Context.html
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,14 @@ <h3 id="interfaces">
</h3>
<dl class="jumplist">
<dt><a class="xref" href="ToSic.Sxc.Context.ICmsBlock.html">ICmsBlock</a></dt>
<dd></dd>
<dd><p>Information about the block - similar to a module.
The block is the 2sxc-internal definition of a unit of content.
In most cases each module has one block, but there are edge cases such as:</p>
<ul>
<li>modules which show the same block - different module-id, same block-id</li>
<li>modules showing multiple blocks such as inner-content.</li>
</ul>
</dd>
</dl>
<dl class="jumplist">
<dt><a class="xref" href="ToSic.Sxc.Context.ICmsContext.html">ICmsContext</a></dt>
Expand Down
Loading

0 comments on commit b57976f

Please sign in to comment.