Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

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 ForumsRepositoryRepositorySharing Files Between Multiple RepositoriesSharing Files Between Multiple Repositories
Previous
 
Next
New Post
9/5/2008 11:30 AM
 

Is it possible to have 2 repositories that upload to and populate from the same folder?  For example, if a file is uploaded through repository 1, it will automatically be displayed in repository 2.  I already have 2 of these modules pointing the same root folder, but they aren't sharing the files for some reason.

Any ideas?

 
New Post
9/11/2008 9:14 AM
 

you'd have to do some ugly hacking in the sproc to achieve that.  Each module has a unique id to identify it's data. So, when you look at the sproc to retrieve data for a module, ModuleID is always passed as a parameter so the sproc can retreive only the records for that particular module instance. If you want 2 modules to retrieve the same data, you'd have to somehow figure out how to tell the sproc which records to retrieve.

For example, if you had 2 repository modules, with IDs of 200 and 201, and looked at the sproc grmGetRepositoryObjects, you'd see that one of the WHERE clauses is .. WHERE ModuleID = @ModuleID. That way module 200 only sees module 200's data and module 201 sees only module 201's data.

You could hard-code some special logic to combine the module IDs, so regardless whether 200 or 201 was passed in, the sproc would return all of the data for those 2 modules.

Pseudocode: you'd have to work out the SQL syntax youself...

replace the WHERE ModuleID = @ModuleID logic with...

if @ModuleID=200 or @ModuleID=201 then
  WHERE ModuleID=200 or ModuleID=201
else
  WHERE ModuleID = @ModuleID
end if

that way if you pass in any other ModuleID you'll only get that module's data, but if you pass in 200 or 201 you'll get the data for both modules combined so they look like one module.

Of course, this is ugly and I'm not recommending hard-coding moduleids in your sprocs, but that's one way that you can achieve your goal.

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositorySharing Files Between Multiple RepositoriesSharing Files Between Multiple Repositories


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