<%@ Master Language="C#" MasterPageFile="~/masterpages/ForumMaster.master" AutoEventWireup="true" %>

<asp:Content ContentPlaceHolderID="main" runat="server">
        <div class="forum-archive">
            <umbraco:Macro Alias="ForumForum" runat="server"></umbraco:Macro>
        </div>
</asp:Content>

<asp:Content ContentPlaceHolderId="Scripts" runat="server">
	
<umbraco:Macro runat="server" language="cshtml">
	
	@{
	 	var cat = -1;
    	if (Model.Level > 3)
    	{
        cat = Model.Id;
    	}

        var page = 1;
        if(Request["page"] != null)
        {
            int.TryParse(Request["page"], out page);
        }
	}
    <script type="text/javascript">
  
        $('table').scrolly({
            page: @page,
            dataUrl: '/umbraco/api/PublicForum/LatestPaged/?cat=@cat',
            template: '#forum-template',
            loadingHtml: '<div class="span"><div class=" loader"></div></div>'
        });
   
	</script>
</umbraco:Macro>

	

</asp:Content>
	