DotSee.VirtualNodes 1.0.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package DotSee.VirtualNodes --version 1.0.4
NuGet\Install-Package DotSee.VirtualNodes -Version 1.0.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DotSee.VirtualNodes" Version="1.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DotSee.VirtualNodes --version 1.0.4
#r "nuget: DotSee.VirtualNodes, 1.0.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DotSee.VirtualNodes as a Cake Addin
#addin nuget:?package=DotSee.VirtualNodes&version=1.0.4

// Install DotSee.VirtualNodes as a Cake Tool
#tool nuget:?package=DotSee.VirtualNodes&version=1.0.4

Lets you specify one or more document types that will be excluded from Umbraco-generated URLs, thus making them "invisible". Those can be used as grouping nodes and they will not appear as part of the URL.

Usage

After you install the package, you will have to add one appSettings entry to your web.config file, as follows:

<add key="virtualnode" value="docTypeToMakeVirtual"/>

Where docTypeToMakeVirtual is the document type alias you want to be treated as a "virtual" node.

You can define more than one "rules" for docTypes by separating them with commas, as follows:

<add key="virtualnode" value="docTypeToMakeVirtual,anotherDocType"/>

You can also use wildcards at the start and/or the end of the document type alias, like this:

<add key="virtualnode" value="dog*,*cat,*mouse*"/>

This means that all document type aliases ending with "dog", all document types starting with "cat" and all those containing "mouse" will be treated as virtual nodes.

Advanced: Auto numbering of nodes

Consider the following example:

articles
  groupingNode1
    article1
    article2
  groupingNode2

Supposing that groupingNode1 and groupingNode2 are virtual nodes, the path for article1 will be /articles/article1. Okay, but what if we add a new article named "article1" under groupingNode2?

The plugin checks nodes on save and changes their names accordingly to protect you from this. More specifically, it checks if the parent node of the node being saved is a virtual node and, if so, it checks all its sibling nodes to see if there is already another node using the same name. It then adjusts numbering accordingly.

So, if you saved a new node named "article1" under "groupingNode2" it would become:

articles
  groupingNode1
    article1
    article2
  groupingNode2
    article1 (1)

And then if you saved another node named "article1" again under "groupingNode1" it would become "article1 (2)" like this:

articles
  groupingNode1
    article1
    article2
    article1 (2)
  groupingNode2
    article1 (1)

This ensures that there are no duplicate urls. Of course, to keep things simple, I've implemented checks only a level up - if you have multiple virtual nodes under each other and multiple nodes with the same name in different levels, better be careful because no checks there. (Yes, I'm lazy).

Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 5,337 7/12/2020
1.0.4 9,349 10/6/2017
1.0.3 11,495 2/13/2017