Welcome to the Learning Center

The Guide | Knowledge Base | FAQ

Browse it all or refine your selection using the filters below on the left.

Using Xmod Pro for Event Listings

XMod Pro is a brilliant tool for bringing together and displaying data in all sorts of ways in DotNetNuke.

By: Angus Beare On: 11/03/2010

Link to this Article

XMod Pro is a brilliant tool for bringing together and displaying data in all sorts of ways in DotNetNuke. Let’s imagine in this case that you need an event management and listing system for your new membership web site for your local sailing club.

The problem is that the budget is very tight and the Events Management module that most closely matches your needs does not display the events in the way that you require for your site. You cannot afford to pay the developer to customize the module for you and you cannot afford the time to build your own solution.

Enter XMod Pro. XMod Pro is the only tool on the market that can help you out here. You need to set up the events system quickly and start entering events before the new sailing season begins. So you buy the Invenmanager Events module and install it on your site. When you are ready with your events all entered you can then create your custom solutions with XMod Pro.

Imagine that you need to display upcoming events. There might be a list module in the package that does some of the things you want to do like show the top 20 upcoming events but you soon find that you can’t show the top 2 or the top 5 because space on your members page is at a premium. Or you want to provide a link to more documents or sort them based on some kind of category. Again, enter XMod Pro.

With XMod Pro, in minutes, you can knock up a template to the Invenmanager data and filter and format it exactly as you wish. Also, since XMP templates are simple to edit your designer, who is comfortable with HTML and CSS but not comfortable with .aspx pages, can easily tweak the layout and style of your templates without needing access to the server files.

<xmod:Template id="Upcoming_Meetings">

<ListDataSource CommandText="
Convert(VarChar(4),year(StartDate)) as SYear,
Right('0' + Convert(VarChar(2),Month(StartDate)), 2) as SMonth,
substring(datename(month,StartDate),0,4) as SMonth2,
Right('0' + Convert(VarChar(2),day(StartDate)),2) as SDay,
datename(month,StartDate) as FullMonthname,
CONVERT(VARCHAR(9), StartDate, 6) AS ddmmyy,
EventsCalendar where StartDate > GetDate()
and category not like '%;1;%' ORDER BY SYear, SMonth, SDay ASC" />

    	<div class="rpum">
    	<div class="rpumDateBox">
    		<div class="rpumDateMonth">[[SMonth2]]</div>
    		<div class="rpumDateDay">[[SDay]]</div>
    	<div class="rpumTitle"><a href="/Home/Meetings/EventorMeetingdetails.aspx?ItemID=[[ItemID]]">[[Title]]</a></div>
    	<div style="clear:both;"></div>
    	<p><a href="/Home/Meetings.aspx" class="rpumALL">All Meetings</a></p>


This example gets the top 3 upcoming events (notice the StartDate > GetDate() clause which gets only upcoming events) from the Invenmanager database and displays links to the events. It also shows a link to another page where all upcoming events are displayed.

You can modify the above example to display events from Invenmanager in any way you wish. Notice that the SQL includes “where category not like ‘%1%’”. This is so that a particular category of event set up in Invenmanager will not be shown. Here it refers to private events. In Invenmanager categories are stored in the EventsCalendarCategory table.

I hope you find this useful and it gives you ideas to solve similar problems.