Advanced Development
Querying Entries by Fields
cms-entry-list
The cms-entry-list
component has a parameter for querying entries by field values (querying-by-fields
), which is a list of instances of the QueryingByField
class. Each QueryingByField
instance contains two parameters:
Name
: The name of the field.Value
: The field value used for querying. Depending on the type of field, the value takes different forms:TextFieldQuerying
: Filters by whether the field contains the specifiedValue
.SwitchFieldQuerying
: TheValue
must be convertible to abool
, and filters by whether the value equals the specifiedValue
.NumericFieldQuerying
: TheValue
is formatted asminValue-maxValue
, filtering by whether the field value is greater thanminValue
and less thanmaxValue
.SelectFieldQuerying
: TheValue
is a comma-separated list ofGuid
values, filtering by whether the field value contains any of theGuid
values inValue
.EntryFieldQuerying
: TheValue
is a comma-separated list ofGuid
values, filtering by whether the field value contains any of theGuid
values inValue
.More supported querying methods will be provided in future versions.
GetListAsync(GetEntriesInput input)
Method
The GetListAsync(GetEntriesInput input)
method in IEntryPublicAppService
accepts a string parameter named QueryingByFieldsJson
, which represents a serialized list of QueryingByField
objects.
In fact, internally, the cms-entry-list
component serializes the list of QueryingByField
objects into JSON and passes it to the QueryingByFieldsJson
parameter of the GetListAsync(GetEntriesInput input)
method in IEntryPublicAppService
.
Resolve Current Tenant by Domain Name
Dignite Cms provides the functionality to determine the current tenant based on the domain name:
Install the
Dignite.Cms.AspNetCore.MultiTenancy
NuGet package into theWeb Site
project.Add
CmsAspNetCoreMultiTenancyModule
to the[DependsOn(...)]
attribute list in your module class.Add the following configuration to the
Module
file of theWeb Site
:
Configure<AbpTenantResolveOptions>(options =>
{
// Resolve current tenant by domain name
options.AddCmsDomainTenantResolver();
});
For the official documentation on determining the current tenant, please refer to: Determining the Current Tenant