Products

Solutions

Resources

Partners

Community

About

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsFAQFAQFAQ Original order and Reverse Original OrderFAQ Original order and Reverse Original Order
Previous
 
Next
New Post
2/15/2011 10:25 PM
 
Sometimes you use the FAQ module and want to keep things in order... and don't want it to change. 
I finally figured out how to put the FAQ's in their original order and reverse original order

You have to modify a stored procedure and the /DesktopModules/FAQs/Settings.ascx



Edit Stored Procedure dbo.FAQSearch  (add 2 lines at end and don't forget the comma)

SET ANSI_NULLS ON

SET QUOTED_IDENTIFIER ON

GO

/* -------------------------------------------------------------------------------------

/   FAQSearch

/  ------------------------------------------------------------------------------------- */

ALTER PROCEDURE dbo.FAQSearch

(

@ModuleId int,

@OrderBy int

)

AS

SELECT

f.ItemId,

f.ModuleId,

f.CategoryId,

f.Question,

f.Answer,

f.CreatedByUser,

f.CreatedDate,

f.DateModified,

f.ViewCount,

c.FaqCategoryName,

c.FaqCategoryDescription

FROM FAQs f

left outer join FAQsCategory c on

f.CategoryId = c.FaqCategoryId

where f.ModuleId = @ModuleId

ORDER BY

  CASE WHEN @OrderBy=0 THEN f.DateModified END DESC,

  CASE WHEN @OrderBy=1 THEN f.DateModified END ASC, 

  CASE WHEN @OrderBy=2 THEN f.ViewCount END DESC,

  CASE WHEN @OrderBy=3 THEN f.ViewCount END ASC,

  CASE WHEN @OrderBy=4 THEN f.CreatedDate END DESC,

  CASE WHEN @OrderBy=5 THEN f.CreatedDate END ASC





Add 2 lines to /DesktopModules/FAQs/Settings.ascx

The beginning of your file should look like this


<%@ Control Language="vb" Inherits="DotNetNuke.Modules.FAQs.Settings" AutoEventWireup="false" CodeBehind="Settings.ascx.vb" %>
<%@ Register TagPrefix="dnn" TagName="SectionHead" Src="~/controls/SectionHeadControl.ascx" %>
<%@ Register TagPrefix="dnn" TagName="Label" Src="~/controls/LabelControl.ascx" %>
<TABLE class="Normal" id="Table2" cellSpacing="3" cellPadding="3" border="0">
<TR>
<TD><dnn:label id="lblDefaultSorting" ControlName="lblDefaultSorting" Suffix=":" runat="server"></dnn:label></TD>
<TD><asp:dropdownlist id="drpDefaultSorting" runat="server" Width="150px" CssClass="Normal">
<asp:ListItem Value="0" resourcekey="OrderByDateNew">Date New</asp:ListItem>
<asp:ListItem Value="1" resourcekey="OrderByDateOld">Date Old</asp:ListItem>
<asp:ListItem Value="2" resourcekey="OrderByPopularityHigh">Popularity High</asp:ListItem>
<asp:ListItem Value="3" resourcekey="OrderByPopularityLow">Popularity Low</asp:ListItem>
<asp:ListItem Value="4" resourcekey="OrderBy.Text">Reverse Original Order</asp:ListItem>
<asp:ListItem Value="5" resourcekey="OrderBy.Text">Original Order</asp:ListItem>



 
New Post
3/12/2011 5:10 PM
 
Will be added to FAQ 04.05.00

XCESS expertise center b.v.
Regards,
Ernst Peter
LinkedIn Profile Ernst Peter Tamminga


XCESS: DNN/Evoq specialist, zie www.xcess.nl

Events 7.0.1 - Released
Reports 6.1.0 - Released
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsFAQFAQFAQ Original order and Reverse Original OrderFAQ Original order and Reverse Original Order


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out