Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: Article Manager 2:
Complex Search

 

 


jferry
User

May 14, 2008, 8:53 AM

Post #1 of 2 (237 views)
Shortcut
Complex Search Can't Post

Hello,

Is there a way provide results based on a complex query. Here is the setup.

We have 1000 business listings and all are assigned to one of many categories. Approx 250 of these listings have a field called "Member" with "Yes" as the answer.

Separately we have a category called "News" where we post news from any one of the 1000 companies in our database. Each news listing also has a field called "Member Number". We place the number corresponding to the Article Number (num) of member.

Question: Is there a way to sort these news posts based on a boolean style query, or some other method so that only results from members will be listed. For now I am using a very long search results template that looks like the following. The actual template has 250 sections for each member number.

<table width="100%" style="border-width: 0px; margin: 0px;">
<!-- template insert : $articleList$ -->
<!-- templatecell : articleRow -->

<!-- templateIf: $article.news_reference_number$ == "43885" -->
<tr><td style="padding:0px 0px 6px 0px;">
<span class="text">$article.date:format(MMMM d, yyyy)$ </span><br />
<span class="text"><a href="$article.news_hyperlink$" target="_blank"><b>$article.title$</b></a> </span> <br />
<span class="text">$article.news_description$</a> </span> <br />
<span class="text"><b>$article.news_source$</b> </span>
</td></tr>
<!-- /templateIf -->

<!-- templateIf: $article.news_reference_number$ == "43890" -->
<tr><td style="padding:0px 0px 6px 0px;">
<span class="date">$article.date:format(MMMM d, yyyy)$ </span> <br />
<span class="text"><a href="$article.news_hyperlink$" target="_blank"><b>$article.title$</b></a> </span> <br />
<span class="text">$article.news_description$</a> </span> <br />
<span class="text"><b>$article.news_source$</b> </span>
</td></tr>
<!-- /templateIf -->

<!-- templateIf: $article.news_reference_number$ == "43905" -->
<tr><td style="padding:0px 0px 6px 0px;">
<span class="date">$article.date:format(MMMM d, yyyy)$ </span> <br />
<span class="text"><a href="$article.news_hyperlink$" target="_blank"><b>$article.title$</b></a> </span> <br />
<span class="text">$article.news_description$</a> </span> <br />
<span class="text"><b>$article.news_source$</b> </span>
</td></tr>
<!-- /templateIf -->

(200+ more section are included in the actual results template)

<!-- /templatecell : articleRow -->

</table>

jferry


Jake
Staff / Moderator


May 15, 2008, 1:00 AM

Post #2 of 2 (226 views)
Shortcut
Re: [jferry] Complex Search [In reply to] Can't Post

Hi jferry,

Thanks for posting. Smile

There is actually a fairly simple way to cut down all of these templateIf's to a single statement. You would want to do the checking based of off your member field:


Code
<!-- templateIf: $article.member$ == "Yes" --> 
***Code here***
<!-- /templateIf -->


Note that if you were to use this on a search results template, false positives would be generated which could cause problems with your next and previous links. This code should only be used on your global index or category index templates.

Give that a shot and let us know if you need anything else!
-----------------------------------------------------------
Cheers,
Jake Swanson - Product Specialist
support@interactivetools.com


Hire me!
Save time by getting our experts to help with your project. Template changes, advanced features, full integration, whatever you need. Whether you need one hour or fifty, get it done fast with Priority Consulting.


 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4