Creating Custom Templates for News.NET
News.NET Application is Zone,Template based.Which means that every zone has its own template. Templates are necessary to display news content.You can have as much Templates as you like. Let us suppose that you have a large content site and the news are divided into zones or categorys. Like sport,Music,Movies etc.You can create template for all of this zones. So each zone has its different look and feel.
NOTES For now News.NET v.0.1 supports only .ascx Templates.This means that your template must have exstension .ascx (sport.ascx,Music.ascx) Also all templates must be placed in Template folder First line in template file must be <%@ Control autoEventWireUp="false" Inherits="News.Template" CodeBehind="~/Admin/Template.ascx.vb" %>
TEMPLATE TOKENS Template tokens are actually server side code which is necessary to correcly parse the news content. There are several tokens you can use in your template.
- <%=SiteName%>- Your Site Name
- <%=SiteUrl%>- Your Site Url
- <%=ApplicationUrl%>- Application Url
- <%=Email%>- Your Site E-mail
- <%=NewsName%>
- <%=Source%>
- <%=Summary%>
- <%=StartDate%>
- <%=EndDate%>
- <%=Thumbnail%>
- <%=ReadTimes%>
- <%=Description%>
- <%=RssFeed%>- Link to Rss Feed
Here is the example of the Template http://www.dotnetwebapps.com/Downloads/News.NET/Templates/v.0.1/Sample.rar
Unpack package and open the sample file.If you dont have Visual Studio you can use Notepad. |