Ok, I'll try and reduce it to the bits that matter:
In this case it is the Free Resource Directory module and its associated FRD TopList (for displaying latest resources). I often want to do the same thing with other modules... pull data out and make use of it, so I'm hoping to learn the basics on how to do this. I do know the data is in there because it is used elsewhere.
So.. this is the Directory's RRListEntries.ascx file. It lists the items in the directory.
It has this at the top:
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="RRListEntries.ascx.cs" Inherits="Dnn.Hispano.Repository.RRListEntries" TargetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
Further down throughout the HTML, it makes use of these bits:
<%=GetPageID()%>
<%=TotalPages%>
<%=TotalRecords%>
<%#DataBinder.Eval(Container.DataItem, "PageURL")%>
<%#DataBinder.Eval(Container.DataItem, "PageNum")%>
<%# DataBinder.Eval(Container.DataItem, "EntryURL") %>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
<%# DataBinder.Eval(Container.DataItem, "WebURL") %>
<%# DataBinder.Eval(Container.DataItem, "Author") %>
and many more including:
<%# DataBinder.Eval(Container.DataItem, "Description") %>
Now.. there is a related module packaged with FRD, the FRD Top List. This module presumably draws on the same data because it is used to display details about the very same items.
This Top List module has this in the header of RRTopView.ascx:
<%@ Control Language="c#" AutoEventWireup="false" Codebehind="RRTopView.ascx.cs" Inherits="Dnn.Hispano.Repository.FRDTopList.RRTopView" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
And further down it has a couple of the same code bits as the other file above:
<%# DataBinder.Eval(Container.DataItem, "EntryURL") %>
<%# DataBinder.Eval(Container.DataItem, "Name") %>
The question is:
How can I also make use of
<%# DataBinder.Eval(Container.DataItem, "Description") %>
in this file as well?
A wild guess would be that I need to add something in the header there to let the module know where to find the Description data.
Any tips are much appreciated.
Rob