Connecting News Articles to Properties is an easy way to connect content on your website through tagging and smart Taxonomy.
Scott McCullough of Ventrian Systems is one of my favorite DNN module developers. His modules are solid, flexible and highly useful. I used them in almost every project; they save me time, deliver results and help me develop features that make me and my clients very happy,
Two of his best and most useful are News Articles and Property Agent. Recently we sponsored an enhancement with Scott that allows us to connect articles to properties based on matching tags. This means a property can grab news articles using a filtered RSS feed and display them within the property presentation.
Pretty cool stuff.
How it works
Everything is connected using an RSS Feed, Tags and a new token in Property Agent that consumes then displays the content from your feed. To get this all working the following changes were added to both modules
Add Tags to News Articles. An additional field was added to News Articles that allows you to enter a comma separated list of tags. This can be anything you want. In my case I added: Artisteer, DNN, Design to my example article.
Add RSS Filter to News Articles. Another feature Scott added to News Articles allows you to pass in a tag string in the RSS Feed and returns a filtered list. In our case, we’ll be trying to construct the following URL:
Add RSSREADER Token to Property Agent. The last thing added was a new token in Property Agent that allows you to consume and display the feed within the View template of Property Agent. This token concepts give you a lot of design flexibility in that is can be placed anywhere, you can style the content to match your site, determine if you want an “all” or “any” match on the tags, determine how many rows to return and since the token itself is on a template you can decide if you want to show just a traditional link to the external feed…of show the entire article within your template.
Setting It Up
1. Prepare News Articles by adding tags to your articles. Tags are found in the Organize section of the Edit Article feature. Add tags, separated by commas that describe your article. In this case I added Artisteer, DN, Design.
2. Next I need to add a custom field in Property Agent to store my tags. Now, in this case I kept it simple and added a single field to store tags complete with pipe delimiters but remember this can be anything…so types or other combinations of fields can be used as well.
3. Now that my Tags field has been added I need to modify the View.htm template to include a token that will consume the RSS Feed.
Here is the View.htm code
<table cellpadding="0" cellspacing="0" width="100%">
<td class="Normal" valign="top">
<td width="350px" valign="top" align="center">
3. Now you can see the results
4. The last step is to modify the the RSSREADER template. In my case I just adjusted the link target so it stay on my site, but you can also include the actual content from your articles here too
The applications for this concept are pretty endless. A real estate site could display local news articles or mortgage information based on the location or type of house, an auto site could display additional content about BMWs next to all of their BMWs online. And since this is simply an RSS feed the content can come from any source – not just News Articles.
Oh, and one more thing…a little birdie told me Scott is adding this same Tagging/RSS functionality for Properties too. So, soon we may be able to go the other way as well.