You can choose topic display in one ,two or three column
1. Add Column in database
alter TABLE [dbo].[Topic]
add [Template] [int] NULL CONSTRAINT [DF_Topic_Template] DEFAULT ((1))
2. Goto Source code
2.1 Goto Libraries => Nop.Core => Domain => Topics => Topic.cs
add this line "public virtual int Template { get; set; }"
2.2 Goto Libraries => Nop.Data => Mapping => Topics => TopicMap.cs
add this line "this.Property(t => t.Template);" in constructor TopicMap()
3. Goto Presentation
3.1 Goto Nop.Web => Models => Topics => TopicModel.cs
add this line "public int Template { get; set; }"
3.2 Goto Nop.Web => Views => Topic => TopicDeatils.cshtml
Find in if (isPopup == null || isPopup == false){ ................ }
and replace
if (isPopup == null || isPopup == false)
{
if (Model.Template == 1)
{
Layout = "~/Views/Shared/_ColumnsOne.cshtml";
}
else if (Model.Template == 2)
{
Layout = "~/Views/Shared/_ColumnsTwo.cshtml";
}
else
{
Layout = "~/Views/Shared/_ColumnsThree.cshtml";
}
}
4 go to Nop web admin and add resource Name "Admin.ContentManagement.Topics.Fields.TemplateColumn" Value "Tamplate"
4.1 Goto Nop.Admin => Models => Topics => TopicModel.cs
add this line "[NopResourceDisplayName("Admin.ContentManagement.Topics.Fields.TemplateColumn")]
[AllowHtml]
public int Template { get; set; }"
in class TopicModel
4.2 Goto Nop.Admin => Views => Topic => _CreateOrUpdate.cshtml
4.2.1 Find text <tr id="pnlPasswordEnabled">
<td class="adminTitle">
@Html.NopLabelFor(model => model.Password):
</td>
<td class="adminData">
@Html.EditorFor(model => model.Password)
@Html.ValidationMessageFor(model => model.Password)
</td>
</tr>
4.2.2 and add this line under text 4.2.1
<tr id="pnlTemplateColumn">
<td class="adminTitle">
@Html.NopLabelFor(model => model.Template):
</td>
<td class="adminData">
@Html.EditorFor(model => model.Template)
@Html.ValidationMessageFor(model => model.Template)
</td>
</tr>
5. Save All and Run