Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

_GeneralCommon.RobotsTxt.cshtml

@model GeneralCommonSettingsModel

@{
    const int maxTextAreaRows = 10;
    const int minTextAreaRows = 5;

    int GetAreaRows(string rows)
    {
        if (string.IsNullOrEmpty(rows))
            return 1;

        var rowsCount = rows.Split(Environment.NewLine).Length;

        return rowsCount switch
        {
            0 => 1,
            < 10 => minTextAreaRows,
            _ => maxTextAreaRows
            };
    }
}

@if (!string.IsNullOrEmpty(Model.RobotsTxtSettings.CustomFileExists)) {

@Model.RobotsTxtSettings.CustomFileExists

} else {
@if (Model.RobotsTxtSettings.AvailableLanguages.Any()) {
}
}

@Html.Raw(Model.RobotsTxtSettings.AdditionsInstruction)