R2i DotNetNuke® Forum

R2i wants you to have the opportunity to ask questions, post reviews, help others or just rant and rave about DotNetNuke® or any of the R2i Modules and Skins. Our team spends hour upon hour, day after day, working on custom DotNetNuke® modules and services; please feel free to ask us anything.
 
Cloning Listx Instances
Last Post 01 Jan 1900 05:00 AM by . 6 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages Informative
zymmetricalUser is Offline
Basic Member
Basic Member
Posts:141

--
10 Sep 2007 01:24 PM  
We've got 130 different DNN tabs, one for each product category. Currently there is one Listx module instance on each of these pages, all the same code.

Obviously this is silly and hard to manage- if we want to update the Listx it has to be done across 130 modules.

How can I have one Listx instance, display on a number of specified pages?

Is this what Packages are for? (sorry if I missed that explanation).
robert_chumleyUser is Offline
Advanced Member
Advanced Member
Posts:592

--
11 Sep 2007 05:51 PM  
The best way we have solved this problem is through the use of skin objects. You can create a skin object that is included on every page that has the same skin. Then when you add a page specify that skin and template to copy the listx. This will make an exact copy. You can also modify this after the fact though the skin that all your pages are attached to.

Thanks,
Robert Chumley
Robert Chumley<br>r2integrated (formally bi4ce)
zymmetricalUser is Offline
Basic Member
Basic Member
Posts:141

--
11 Sep 2007 09:14 PM  
Robert, thanks for this tip. I'm unexperienced with skin objects.. so let's say I have 100 dnn tabs in a certain product category. I would create a skin custom for them and apply it to those tabs.

What exactly is the method for implementing ListX as a skin object in a skin? I see some examples around about inserting Pagetitle etc. but these are very simplistic.. how can I stuff a whole module instance into a skin object? (sorry if i'm missing the point)

Thanks
rgallaisUser is Offline
Basic Member
Basic Member
Posts:146

--
14 Sep 2007 02:44 PM  
Hi zymmetrical,

Please refer to the page 178 of the documentation.
Briefly, you just have to create a listX module on a page and setup the appropriate tag definition pointing to your skin:
<%@ Register TagPrefix="b4" TagName="LISTX" Src="~/DesktopModules/ListX/xListingSkin.ascx" %>
<b4:LISTX runat="server" id="b4ListXVersion" TabID="[ListXTabId]" ModuleID="[ListXModuleId]" TabModuleID="[ListXTabModuleID]" useCurrent="False" />

That's it

Regards
Romain Gallais<br>Business Intelligence Force, Inc. (bi4ce)
zymmetricalUser is Offline
Basic Member
Basic Member
Posts:141

--
14 Sep 2007 06:00 PM  
Hi Robert, that works beautifully.

My only issue: My original, source module, identifies the product category it should display based on the current TabID:

EXEC [dbo].[GetPhotosByCategoryTabID] 1, 1, [TABID,System], @sort_key

When I make a skin object based on this module, and display it on a different page, it's still showing the product category of the original source module, instead of the category related to the current tab it's residing on.

Can you think of a way to overcome this?
zymmetricalUser is Offline
Basic Member
Basic Member
Posts:141

--
14 Sep 2007 06:32 PM  
*Sorry, Romain. ;)
zymmetricalUser is Offline
Basic Member
Basic Member
Posts:141

--
15 Sep 2007 05:01 PM  
Never mind, problem solved. Once again, its in the manual (page 182):

<i> NOTE: The useCurrent flag seems to be a bit foolish at times, and does not always return the current TabID when [TabID,System] is requested. Instead, use the reflection parameters of ListX – [PortalSettings.ActiveTab.TabId,System]</i>

I changed my original source sproc call to use that tag instead of [TABID,System] and now all the clone modules magically show the right results.

Thanks!
You are not authorized to post a reply.

Active Forums 4.1
 

New York, NY • Baltimore, MD • Vienna, VA • St. Louis, MO • Seatle, WA • 410.327.0007 • info@R2Integrated.com

Bookmark & Share Bookmark and Share