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 ForumsRepositoryRepositoryis it possible to extra data from the repository module and place into a text/html module?is it possible to extra data from the repository module and place into a text/html module?
Previous
 
Next
New Post
4/2/2015 10:35 AM
 

We are using a Repository module to display latest news items on our website.

We would like to extract the latest 2 news articles from the Repository and display them in a Text/HTML module.

Is this possible and does anyone know how it would be achieved please?

I'm hoping its simply a matter of referring to the table in question in the header settings of the Text/HTML module and running a query to show the latest in the Repository news table?

 
New Post
4/2/2015 12:06 PM
 
This isn't something you would do with the Text/HTML module...unless you want to continuously copy content from the Repository to the HTML module (Text/HTML modules are for "static" content only).

You might simply use Add Existing Module and make a reference to your Repository, then set the max items in that copy to 2.

If the settings of the Repository are too tightly integrated, another option would be to use the Reports module.
 
New Post
4/2/2015 4:47 PM
 
For what it's worth, I suspect you could do this with a Razor script. I haven't used the Repository module, but I would think it'd be possible.
 
New Post
4/8/2015 8:59 AM
 
Mike Riley wrote:
You might simply use Add Existing Module and make a reference to your Repository, then set the max items in that copy to 2.

 thanks for the comments.

RE: max items - if I change this to 2 - it also changes on the source page too. (and I'd also like to style it differently).

So, perhaps Razor Script is the way to go, although I don't know much about it yet, so not sure where to start here.

 
New Post
4/9/2015 4:41 PM
Accepted Answer 
I'd suggest the Reports module then.

"SELECT TOP 2 * FROM grmRepositoryObjects WHERE ModuleID=XXXX AND Approved=1 ORDER BY UpdatedDate DESC"

You could use the HTML visualizer to create a template for styling the output.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryis it possible to extra data from the repository module and place into a text/html module?is it possible to extra data from the repository module and place into a text/html module?


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