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 ForumsNews FeedsNews FeedsNews alert in main pageNews alert in main page
Previous
 
Next
New Post
3/8/2007 8:41 AM
 

Hi all,

I have created a page for each department on my intranet application. Users of each department are able to add announcments on their page. Is there a way to show  news on the main page as a link> for instance if someone adds a new anncoument in finance page the link is dispalyed on the main page of the intranet. Does someone know how to do this? cheers,

Skips

 
New Post
3/11/2007 6:53 AM
 
Firstly, check the "allow syndicate" setting in each of the announcement modules. then add a news-feed module on the main page or any page of your choice. in this module click "edit newsfeed", select link type as "URL" and enter the url of your portal followed by "rss.aspx" (so it would be like- http://localhost/dotnetnuke/rss.aspx), and click update.

this approach although is simple, it has limitations. anything that you have syndicated on your portal shall be included as a link in the news module, not just your announcements. the bigger problem which i have also been faced is that the updates in the original module are not reflected promptly in the news module, which means if an announcement is deleted from original announcement module, its link may still be shown in the news module.

iam not aware about the latest updates/improvements in the module so its definitely worth trying out.

Author - 'Become an iMature Student'
Book on 'Internet Maturity' for all students.
 
New Post
3/12/2007 2:32 PM
 

A way to show only selected modules syndicated content is to take advantage of the way the default rss.aspx and search mechanism returns the information.  The module name is appended to the rss item, which can be parsed and filtered by a custom xsl to render only the modules you want displayed.

For example, when you want to use internal syndication and selectively choose which modules to display, name your modules with something to use as a filter.  You could place a announcement module on each department's page titled 'MyDepartment Info'.  Then, use the following custom xsl on a New Feeds (RSS) module placed on the home page.

 <?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" exclude-result-prefixes="xsl"
   xmlns:dc="http://purl.org/dc/elements/1.1/">
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/>

<xsl:template match="/">
 <div>
  <xsl:apply-templates select="rss/channel"/>
  </div>
</xsl:template>

<xsl:template match="rss/channel">
<xsl:variable name="link" select="link"/>
  <xsl:variable name="description" select="description"/>
  <xsl:variable name="image" select="image/url"/>
  <xsl:variable name="idesc" select="image/description"/>
  <xsl:variable name="ilink" select="image/link"/>
  <xsl:variable name="iwide" select="image/width"/>
  <xsl:variable name="ihigh" select="image/height"/>

<div class="rssChannel">
 <xsl:if test="$image">
    <a href="{$ilink}" title="{$idesc}"><xsl:value-of select="ilink" /></a>
    <img src="{$image}" height="{$ihigh}" width="{$iwide}" style="float: left; margin: 2px; border: 0px;"/>
 </xsl:if>
 <a href="{$link}"><xsl:value-of select="title" /></a><br/>
 </div>
<div class="rssChannelDescription">
 <xsl:value-of select="description"/><br/>
</div>
<div class="rssChannelsubHead">
 <xsl:value-of select="webMaster"/><br/>
 <xsl:value-of select="copyright"/><br/>
 <xsl:value-of select="lastBuildDate"/>
 <hr/>
</div>
<xsl:apply-templates select="item" />

</xsl:template>


<xsl:template  match="item">
  <xsl:variable name="item_link" select="link"/>
  <xsl:variable name="item_title" select="description"/>
  <xsl:variable name="myTitle" select="title"/>
  <xsl:if test="contains($myTitle,'Info')">
     <div class="rssItem">
     <a href="{$item_link}" title="{$item_title}"><xsl:value-of select="title" disable-output-escaping="yes"/></a>
   </div>
   <div class="rssItemDescription">
   <xsl:value-of select="description" disable-output-escaping="yes"/><br/>
   </div>
   <div class="rssItemSub">
    By: <xsl:value-of select="dc:creator"/><br/>
    (<xsl:value-of select="pubDate"/>)<br/> <hr/>
   </div> 
  </xsl:if>
</xsl:template>

</xsl:stylesheet>

Now, only the modules syndicated content with 'Info' in its' title will be displayed on a New Feeds (RSS) module using the custom xsl.

I'd agree that there are some issues with this approach due to the caching, and searchItem entries not always being updated in a timely manner.  The approach I take is to use the Host account, go to the Schedule option, and re-index content, and update.  Then, the search mechanism kicks in and parses the modules, adding syndicated content to the SearchItems table.  There's a few other gotchas, but this should work for most situations.

The custom xsl provided includes some references to css sytles, which can be used, but in this case, if there is not a style available, the parser will disregard them.  Also, you can modify this xsl to only display the latest announcement by using some other item filters such as position testing, and a lot of other functions.  This is just one way to approach it.

Cheers,

iwonder

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsNews FeedsNews FeedsNews alert in main pageNews alert in main page


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