private void Page_Load(object sender, EventArgs e)
{
try
{
LocalizeControls();
if (_itemType != null)
{
//TODO: we need to figure out PortalID so we can get the folloing items from Cache
if (_itemType.Equals(ItemType.Category.Name, StringComparison.OrdinalIgnoreCase))
{
//TODO: where can we get portalid from? NEED NEW METHOD - HK
Category category = Category.GetCategory(_itemId);
DisplayItem(category);
}
else if (_itemType.Equals(ItemType.Article.Name, StringComparison.OrdinalIgnoreCase))
{
Article article = Article.GetArticle(_itemId);
DisplayItem(article);
}
else if (_itemType.Equals("OLDARTICLE", StringComparison.OrdinalIgnoreCase))
{
int newId = Article.GetOldArticleId(_itemId);
Article article = Article.GetArticle(newId);
DisplayItem(article);
}
}
}
catch (Exception ec)
{
DotNetNuke.Services.Exceptions.Exceptions.ProcessPageLoadException(ec);
}
}