The LookUp engine will parse tokens like
[Module:ModuleId] and then look for a LookUp Source with the matching name, in this case
For this to be possible, the Engine has a list of named sources like
On this page we'll explain how these work, and what special sources exist.
These are the sources which are automatically included in 2sxc
- App Sources
- Web Server and System Sources Hybrid
These work both on Dnn and Oqtane (2sxc 12+)
- Web Server and System Sources
- CMS / Dnn Sources
- User Information Sources
Token Template Sources
In Token Templates we also have 3 special lookups
Content- the current content
Content:Presentation- presentation settings of the current content, if configured
AnyNameYouWantspecified in a
In Queries we also have the following sources
DataSource Settings Source
In DataSources code you will usually only work with
Settings which contain all the settings that specific DataSource should work with. The
Settings source only exists in your C# code, not in the VisualQuery.
What is a LookUp Source (technical ⚠)
LookUp Sources are ILookUp objects and have a
Name like like
Each one is capable of retrieving values like
So the Engine will ask the specific source for the expected value and the source will try to find it. If it has an answer, it will return that. If it doesn't find anything it will return null and let the Engine take care of fallback options.
Everything is lazy, so these objects are only accessed and populated if the parameter is actually needed. This results in great performance.
Internal LookUp Objects (technical ⚠)
Just to give you an idea of the power of LookUp objects, here are some in use:
- LookUpInEntity - this resolves entity values.
- LookUpInNameValueCollection - this resolves from name/value lists like
- LookUpInLookUps - will look up values in various attached LookUp objects
- LookUpInDataTarget - will look up a value from an
Instream of a DataSource
- LookUpInDnnPropertyAccess - will look up stuff in Dnn specific PropertyAccess objects, which are similar to LookUp objects
- LookUpInEntity - will look up things in an IEntity and also provide more information like Count, IsFirst, etc. for the Token Engine
- General Tokens introduced in 2sxc 1.0
- Most enhancements were in 2sxc 07.00