<%@ Page CodeFileBaseClass="AliCMS.Lib.SystemPageBase" %>
<script language="c#" runat="server">
protected DataTable Pages
{
	get
	{
		DataTable result = new DataTable();
		result.Columns.Add("Path", typeof(string));
		
		string templatePath = Manager.MapPath(Request.QueryString["TemplatePath"]);
		if (!System.IO.Directory.Exists(templatePath))
			return result;
		
		string[] files = System.IO.Directory.GetFiles(templatePath, "*.dwt.as?x*", System.IO.SearchOption.AllDirectories);
		foreach (string file in files)
		{
			DataRow row = result.NewRow();
			row["Path"] = file.Substring(templatePath.Length).Replace("\\", "/");
			result.Rows.Add(row);
		}
		
		return result;
	}
}
</script>
<ali:List Source="Pages">
	<ali:Record>
		<option value="<%=[0]%>"><%=[0]%></option>
	</ali:Record>
</ali:List>