Skip to content
This repository was archived by the owner on Aug 17, 2021. It is now read-only.

Bug/#205804 #19

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/AlloyDemoKit/Business/PageViewContextFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public virtual LayoutModel CreateLayoutModel(ContentReference currentContentLink
LoginUrl = new MvcHtmlString(GetLoginUrl(currentContentLink)),
SearchPageRouteValues = requestContext.GetPageRoute(startPage.SearchPageLink),
SearchActionUrl = new MvcHtmlString(EPiServer.Web.Routing.UrlResolver.Current.GetUrl(startPage.SearchPageLink)),
IsInReadonlyMode = _databaseMode.DatabaseMode == DatabaseMode.ReadOnly
IsInReadonlyMode = _databaseMode.DatabaseMode == DatabaseMode.ReadOnly,
ContactForm = startPage.ContactForm
};
}

Expand Down
5 changes: 5 additions & 0 deletions src/AlloyDemoKit/Models/Pages/StartPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using EPiServer.DataAnnotations;
using EPiServer.SpecializedProperties;
using AlloyDemoKit.Models.Blocks;
using EPiServer.Forms.Implementation.Elements;

namespace AlloyDemoKit.Models.Pages
{
Expand Down Expand Up @@ -65,5 +66,9 @@ public class StartPage : SitePageData
[Display(GroupName = Global.GroupNames.SiteSettings)]
public virtual SiteLogotypeBlock SiteLogotype { get; set; }

[Display(GroupName = Global.GroupNames.SiteSettings)]
[AllowedTypes(typeof(FormContainerBlock))]
public virtual ContentArea ContactForm { get; set; }

}
}
1 change: 1 addition & 0 deletions src/AlloyDemoKit/Models/ViewModels/LayoutModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ public class LayoutModel
public MvcHtmlString SearchActionUrl { get; set; }

public bool IsInReadonlyMode {get;set;}
public ContentArea ContactForm { get; internal set; }
}
}
4 changes: 4 additions & 0 deletions src/AlloyDemoKit/Views/Shared/Footer.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
</li>
</ul>
</div>


@* Bug below *@
@Html.PropertyFor(Model.Layout.ContactForm)
</div>
</div>
</div>