<% Dim catRS Set catRS = GetCategory(EnVivo_CurrentCategory) If LCase(EnVivo_Action) = "search" Then If IsNumeric(GetAppSetting("SEARCHPAGETEMPLATE")) Then GenerateContent Response.Write RenderPage(EnVivo_Action, EnVivo_ID, EnVivo_Limit, EnVivo_Order, EnVivo_Sort) Response.End Else If LCase(GetAppSetting("ENVIRONMENT")) = "windows" Then Server.Transfer GetAppSetting("SEARCHPAGETEMPLATE") Else Response.Redirect GetAppSetting("SEARCHPAGETEMPLATE") & "?" & Request.ServerVariables("QUERY_STRING") End If End If ElseIf (Trim(EnVivo_Action) = "") Or IsEmpty(EnVivo_CurrentCategory) Or catRS.EOF Then If IsNumeric(GetAppSetting("DEFAULTPAGETEMPLATE")) Then GenerateContent Response.Write RenderPage(EnVivo_Action, EnVivo_ID, EnVivo_Limit, EnVivo_Order, EnVivo_Sort) Response.End Else If LCase(GetAppSetting("ENVIRONMENT")) = "windows" Then Server.Transfer GetAppSetting("DEFAULTPAGETEMPLATE") Else Response.Redirect GetAppSetting("DEFAULTPAGETEMPLATE") & "?" & Request.ServerVariables("QUERY_STRING") End If End If Else If LCase(EnVivo_Action) = "article" Then If Trim(catRS("asparticlepagetemplate")) <> "" Then If LCase(GetAppSetting("ENVIRONMENT")) = "windows" Then Server.Transfer catRS("asparticlepagetemplate") Else Response.Redirect catRS("asparticlepagetemplate") & "?" & Request.ServerVariables("QUERY_STRING") End If Else GenerateContent Response.Write RenderPage(EnVivo_Action, EnVivo_ID, EnVivo_Limit, EnVivo_Order, EnVivo_Sort) End If ElseIf LCase(EnVivo_Action) = "category" And Not catRS.EOF Then If Trim(catRS("aspcategorypagetemplate")) <> "" Then If LCase(GetAppSetting("ENVIRONMENT")) = "windows" Then Server.Transfer catRS("aspcategorypagetemplate") Else Response.Redirect catRS("aspcategorypagetemplate") & "?" & Request.ServerVariables("QUERY_STRING") End If Else GenerateContent Response.Write RenderPage(EnVivo_Action, EnVivo_ID, EnVivo_Limit, EnVivo_Order, EnVivo_Sort) End If Else GenerateContent Response.Write RenderPage(EnVivo_Action, EnVivo_ID, EnVivo_Limit, EnVivo_Order, EnVivo_Sort) End If End If Set catRS = Nothing EnVivo_Terminate %>