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

Home: Discontinued Products: Article Manager 1:
Exclude category(s) from headlines and index

 

First page Previous page 1 2 Next page Last page  View All


kezza
User

Jun 2, 2006, 3:46 AM

Post #1 of 32 (5637 views)
Shortcut
Exclude category(s) from headlines and index Can't Post

I'm hoping there's a simple way of doing this (couldn't find an 'ideal' solution in the forum!) ...

I'm using an SSI to pull in latest headlines onto a home page (headlines_.asp) ... I want to exclude a particular category from these headlines (possibly two categories) but I can't see a way of doing this.

Likewise, how can I exclude a specific category (or categories) from the index page?

All suggestions gratefully received!

Kerry
Kerry


PublishCron
iTools Alumni


Jun 2, 2006, 11:04 AM

Post #2 of 32 (5626 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

Hey Kerry,

This post should help you with that.
-----
interactivetools.com alumni 2003-2006


kezza
User

Jun 2, 2006, 12:52 PM

Post #3 of 32 (5620 views)
Shortcut
Re: [PublishCron] Exclude category(s) from headlines and index [In reply to] Can't Post

hhmmm - I think I didn't explain myself very well ... thanks for the link but I'd already seen that and I don't think it would achieve what I want to do!

Basically I want to display a list of latest headlines and limit it to the 10 most recent headlines but exclude headlines from a particular category. Whilst using an include for each of the cat_headlines I want to include would work, it would bring in all the headlines from each of the categories. What I want is just the 10 most recent headlines no matter what category (but excluding one specific category!!)

Also I want publish/index.html to list all listings in chronological order but to exclude the one specific category ... I'm guessing I'd need to create a custom search to achieve this??
Kerry


MikeB
Staff / Moderator


Jun 3, 2006, 3:26 PM

Post #4 of 32 (5605 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi Kerry,

Thanks for the post and the additional details! Smile

If you're hoping to display a list of the 10 latest articles and also exclude a couple of categories then you'll want to use a Server Side Include that executes Article Manager's search and looks only in specific categories.

I'd suggest taking a look at this forum post:

http://www.interactivetools.com/forum/gforum.cgi?post=41099#41099

This sounds like it will do what you're hoping for Article Manager's index page. From there you can use this same include on the main page of your site to bring in 10 articles using a search query while excluding specific categories.

I hope this helps and if you have any other questions feel free to let me know! Smile

Cheers,
Mike Briggs - 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.


kezza
User

Jun 4, 2006, 2:26 AM

Post #5 of 32 (5598 views)
Shortcut
Re: [MikeB] Exclude category(s) from headlines and index [In reply to] Can't Post

Mike - thanks for that link ... however, I can't seem to get it to work for me! I've checked and double-checked paths etc but something is not right. I wonder if you can take a quick look for me ....

This page -link removed- has the following SSI :

<!--#include file="cgi-bin/cms/exec/search.cgi?search=1&perpage=10&cat=19,20,21&template=search/headline_search.html" -->

When you try to view that page it reports "include file not found"

On this page -link removed- I've added a 'test link' which uses precisely the same path and it works fine. As you can see both pages are in the same root location on the server, so I can't understand why a direct link to the search works, and the virtual link doesn't!!Crazy

I'd appreciate your advice please

Thanks

Regards

Kerry
Kerry

(This post was edited by Donna on Sep 5, 2006, 4:36 PM)


ross
Staff / Moderator


Jun 4, 2006, 3:21 PM

Post #6 of 32 (5594 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi kezza

Thanks for the update!

While I can’t be certain, I susspect the problem here is going to be the path to your include file. Try adding a “/” to the beginning like this:

<!--#include file="/cgi-bin/cms/exec/search.cgi?search=1&perpage=10&cat=19,20,21&template=search/headline_search.html" -->

Now, if that doesn’t get you going, could you send me a support request with some FTP details?

https://www.interactivetools.com/support/email_support.cgi

That way I can take a closer look at what’s happening on your server. I look forward to hearing from you Smile
-----------------------------------------------------------
Cheers,
Ross Fairbairn - 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.




kezza
User

Jun 6, 2006, 10:29 AM

Post #7 of 32 (5578 views)
Shortcut
Re: [ross] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi Ross - sorry for the delayed response ... for some reason I didn't get an email alert to tell me you'd responded!

I had previously tried include the 'slash' in front of the path, but that results in a response of :

Active Server Pages error 'ASP 0130'

Invalid File attribute

/testindex.asp, line 114

File attribute '/cgi-bin/cms/exec/search.cgi?search=1&perpage=10&cat=19,20,21&template=search/headline_search.html' cannot start with forward slash or back slash.

I'm sending you a support request now!

Thanks

Kerry
Kerry


kezza
User

Jun 6, 2006, 10:34 AM

Post #8 of 32 (5576 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

Ross - support request just sent ... I forgot to say in the support request that you should feel free to 'play around' with the SSI on the test page(s) listed if you need to!
Kerry


kezza
User

Jun 9, 2006, 11:12 PM

Post #9 of 32 (5555 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

This is an update for anyone reading this thread. The SSI option would not work on our shared server; I was unable to establish why it wouldn't work but had to come up with an alternative. I had the idea of using javascript to exclude certain categories from the results and with the usual excellent assistance of Interactive (Ross on this occasion) we came up with what I think is a rather elegant solution!

This is the script (explanations below!) :

<script>
if ('$cat_name_je$' != 'CatNameHere' && '$cat_name_je$' != 'CatNameHere')
{
document.write("<span class='title'>$cat_name_je$</span><br>");
document.write("$art_name_je$<br>");
document.write("<a href='$url_index$'><img src='PathToMoreInfoButtonImageHere' alt='More' width ='nn' height ='nn' border='0'/></a><br>");
}
</script>

This script will exclude headlines that fall into any of the categories in the first line - to add more categories simply copy the code from && onwards (IA please correct me if I'm wrong there!).


Note : the categories appear to be case sensitive so make sure that the $cat_name$ fields are precise matches for what's stored in ArtMan!

(My original script worked the opposite way whereby it used and else/or scenario (if category="not wanted" then write nothing else write the details - Ross very kindly neatened it all up for me!!). Ross also told me how the content of the document.write lines was wrapped with double quotes enabling the inclusion of HTML tags in single quotes, which meant I could use CSS styling etc.

My thanks to Ross for his help Smile

Kerry

(This post was edited by kezza on Jun 9, 2006, 11:18 PM)


MikeB
Staff / Moderator


Jun 10, 2006, 4:10 PM

Post #10 of 32 (5542 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi Kerry,

Thanks for the post! Smile

I'm glad to hear that this solution worked for you and thanks for posting this in the forum and hopefully this will be helpful for anyone who is looking for a JavaScript option to include articles from only specific categories.

If you have any other questions or comments, just let me know! Smile

Cheers,
Mike Briggs - 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.


webgroup
User

Sep 8, 2006, 2:22 PM

Post #11 of 32 (5278 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

Where do I put that script?
Do I have to add it or replace some current text?

What's the image you are refering there?

Thanks


kezza
User

Sep 9, 2006, 12:52 AM

Post #12 of 32 (5248 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi "WebGroup" - the javascript replaces what is currently used in the default headlines template for <!-- templatecell : xxx --> so instead of (for example) :

<!-- templatecell : row_summary -->
<tr><td><a href="$url_index$#$art_num$">$art_name$</a></td></tr>
<!-- /templatecell : row_summary -->

You would have :

<!-- templatecell : row -->
<tr>
<td><p>
<script>
if ('$cat_name_je$' != '
CatNameHere' && '$cat_name_je$' != 'CatNameHere')
{
document.write("<span class='title'>$cat_name_je$</span><br>");
document.write("$art_name_je$<br>");
document.write("<a href='$url_index$'><img src='PathToMoreInfoButtonImageHere' alt='More' width ='nn' height ='nn' border='0'/></a><br>");
}
</script>
</td>
</tr>
<!-- /templatecell : row -->

I'm pretty certain that should work for you but hopefully IA will also respond on this thread! The image I'm referring to is simply an image I used to hyperlink to the article rather than simply having text 'Read More' or 'read full article'etc.

Hope this helps

Regards

Kerry
Kerry


webgroup
User

Sep 9, 2006, 2:14 AM

Post #13 of 32 (5245 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

This is what Im using on my templates/headlines/default:

<!-- templatecell : row_summary -->
<tr>
<td><p>
<script>
if ('$cat_name_je$' != 'Reggaeton News' && '$cat_name_je$' != 'Reggaeton News')
{
document.write("<span class='title'>$cat_name_je$</span><br>");
document.write("$art_name_je$<br>");
}
</script>
</td>
</tr>
<!-- /templatecell : row_summary -->

The category name I want to exclude is Reggaeton News.

its not working, its showing the articles fron Reggaeton News


kezza
User

Sep 9, 2006, 2:36 AM

Post #14 of 32 (5242 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

Sorry, I omitted to say that the example catered for more than one category to be excluded! Try this :if ('$cat_name_je$' != 'Reggaeton News')

hopefully that will work for you ... also you do need to make sure that the category is a precise match for the category within ArtMan

Hope this helps!

Regards

Kerry
Kerry


webgroup
User

Sep 9, 2006, 7:15 PM

Post #15 of 32 (5236 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

No luck, still not working.
yes Im using the category name exactly as in artman. Unsure


kezza
User

Sep 9, 2006, 11:19 PM

Post #16 of 32 (5232 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

I realised that there is a CSS class included in my script which of course you won't have, although that shouldn't stop it working but who knows .........? Try removing the span and class attributes so you are left with

document.write("$cat_name_je$<br>");

Give that a try ... other than that I'm not really sure why it wouldn't work to be honest!
Kerry


webgroup
User

Sep 10, 2006, 12:26 AM

Post #17 of 32 (5230 views)
Shortcut
Re: [kezza] Exclude category(s) from headlines and index [In reply to] Can't Post

No luck.
i will continue to ask for help on the original thread that I was refered here.

Thanks


kezza
User

Sep 10, 2006, 1:58 AM

Post #18 of 32 (5226 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

Sorry about that .... it works for me but, in honesty, I'm not a 'code person' and it was trial & error getting it to work on my pages so it could be down to the way your pages are built that's affecting it? Hopefully someone from IA will pick up on this and get back to you :D
Kerry


ChetW
Staff


Sep 10, 2006, 2:01 PM

Post #19 of 32 (5192 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi,

Thanks for the post!

You may want to try changing this line of code:


Code
  

if ('$cat_name_je$' != 'Reggaeton News' && '$cat_name_je$' != 'Reggaeton News')



To this:


Code
  

if ('$cat_name_je$' != 'Reggaeton News')



Your code should know look like this:


Code
  

<!-- templatecell : row_summary -->
<tr>
<td><p>
<script>
if ('$cat_name_je$' != 'Reggaeton News')
{
document.write("<span class='title'>$cat_name_je$</span><br>");
document.write("$art_name_je$<br>");
}
</script>
</td>
</tr>
<!-- /templatecell : row_summary -->



Give this a try webgroup and if you have any other questions please don't hesitate to ask. :)
Cheers,
Chet Woodside - 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.



webgroup
User

Sep 10, 2006, 11:07 PM

Post #20 of 32 (5164 views)
Shortcut
Re: [ChetW] Exclude category(s) from headlines and index [In reply to] Can't Post

??
this is the same that I tried above:

Sorry, I omitted to say that the example catered for more than one category to be excluded! Try this :if ('$cat_name_je$' != 'Reggaeton News')

its not working Unsure


Donna
Staff / Moderator


Sep 11, 2006, 3:13 PM

Post #21 of 32 (5126 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi there,

Can you let me know what happens when you do try this? Do you get any error messages?

Donna


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.


webgroup
User

Sep 11, 2006, 3:15 PM

Post #22 of 32 (5124 views)
Shortcut
Re: [Donna] Exclude category(s) from headlines and index [In reply to] Can't Post


In Reply To
Hi there,

Can you let me know what happens when you do try this? Do you get any error messages?


No error, just the article shows.


webgroup
User

Sep 12, 2006, 1:58 AM

Post #23 of 32 (5114 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

any news?? Crazy


ross
Staff / Moderator


Sep 12, 2006, 8:33 AM

Post #24 of 32 (5110 views)
Shortcut
Re: [webgroup] Exclude category(s) from headlines and index [In reply to] Can't Post

Hi webgroup.

Could you post a link to a sample page we can have a look at here. Because we aren’t really JavaScript gurus it’s a little tricky for us but with an example from your site to reference, it should help narrow things down.

You can email us through support@interactivetools.com if you didn’t want to have links to your site in the forum. Also, if you could post or send in your template so I can test it out myself, that would be great!

I look forward to hearing from you either way Smile.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - 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.




webgroup
User

Sep 12, 2006, 3:43 PM

Post #25 of 32 (5085 views)
Shortcut
Re: [ross] Exclude category(s) from headlines and index [In reply to] Can't Post

I dont know how it would hel to see my website, I have exactly this code:

<!-- templatecell : row_summary -->
<tr>
<td><p>
<script>
if ('$cat_name_je$' != 'Reggaeton News')
{
document.write("<span class='title'>$cat_name_je$</span><br>");
document.write("$art_name_je$<br>");
}
</script>
</td>
</tr>
<!-- /templatecell : row_summary -->

First page Previous page 1 2 Next page Last page  View All
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
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