 |

ColinW-O
User
Jun 8, 2002, 4:27 PM
Post #1 of 12
(4244 views)
Shortcut
|
|
Different categories displayed on same page
|
Can't Post
|
|
Is it possible to display let's say 4 different categories on the same page with 10 or 20 headlines for each category? I currently have one category, named 'News' and all the headlines are displayed at http://www.wrestling-online.com/news/ . I want to add 'Press Releases', 'TV Reports' and maybe another category with 20 headlines from each category displayed in the same URL I showed above. Is this possible at all? Colin
|
|
|  |
 |

philm
User
Jun 10, 2002, 6:44 AM
Post #2 of 12
(4232 views)
Shortcut
|
|
Re: [ColinW-O] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Hey Colin, I think I understand what you mean. What you need to do is open the *original* template files and copy the code for the right hand headline table. I think it's an SSI if i remember correctly, so, copy the SSI into the large centre area of your website and customize. The headlines should now appear there. If it works all you need to do is go into setup options in the control panel and there's an option for the number of headlines to display, change it to 20 and that should be it.
.:Sticky New Media:.
|
|
|  |
 |

Dave
Staff
/ Moderator

Jun 10, 2002, 10:08 PM
Post #3 of 12
(4218 views)
Shortcut
|
|
Re: [ColinW-O] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Article Manager publishes an index page and headlines page for each category. The headlines pages are named (by default) cat_headlines_NN.shtml (where NN is the category number) and created in your publish folder (whatever you've set that to be, it's /publish/ by default). You can specify how published files are named, where they're published to, and how many articles get displayed on each of the various pages in the Setup Options menu. Say you determined that your "TV Reports" headlines were being published to http://www.wrestling-online.com/news/cat_headlines_12.shtml You could add a SSI (server side include) to your main page like this to include them: <!--#include virtual="/news/cat_headlines_12.shtml" --> Of course, you'd need to make sure your main page is setup to parse SSI's. Usually that means giving the file a .shtml extension or changing a setting in your web server config file. Easiest thing to do is just try it and see if it works first before renaming files or look for config settings. Since you've already got Article Manager up and running you've probably already got SSI's enabled. Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

ColinW-O
User
Jun 27, 2002, 9:59 AM
Post #4 of 12
(4077 views)
Shortcut
|
|
Re: [Dave] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Alrighty....I created a category called TV Reports. It is at http://www.wrestling-online.com/news/cat_headlines_10.shtml Now I'm calling that via SSI on the global index page, at http://www.wrestling-online.com/news/ but everytime I post in the "TV Reports" category, it will also post to the news section, published at the /news/ URL. So basically it's there twice, in two different categories. What can I do so anything I post in that category won't be published in the main News category? I removed the SSI tag from the site for now, so all you'll see is the News one. Thanks Colin Wrestling-Online.com
|
|
|  |
 |

Dave
Staff
/ Moderator

Jun 28, 2002, 5:07 PM
Post #5 of 12
(4058 views)
Shortcut
|
|
Re: [ColinW-O] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Well, there are basically 4 things you can do to get a listing of articles. They are: Global Category Index - this lists the top X articles from all categories Global Headline Index - same as above, but usually just headlines Category Index - top articles from a specific category Category Headlines - top headlines from that category (usually on right side) So you can re-arrange those anyway you like. So if you use SSI's to load your various category headline files and show them on your frontpage you probably don't want the global category index on there as well because they'll both show the same articles. If you take a look at http://www.mobileguy.com he has an interesting setup. I'd guess it's setup like this: Frontpage - uses SSIs to include Category Headlines files set for 2 articles per page each AND includes the global headline index down the right side. Category Index Pages - use standard category index files with the global headline index down the right side. Article Pages - standard article pages, with Category Headline files (set for 2 articles per page) on the right hand side. And it doesn't look like he's using the Global Category index anywhere. Is that the kind of structure you want? : ) If you're still not sure let me know what kind of layout you were hoping for and we can see if we can come up with any ideas. Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

ColinW-O
User
Jun 29, 2002, 6:10 AM
Post #6 of 12
(4034 views)
Shortcut
|
|
Re: [Dave] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
This is basically what I need. NEWS - Headline 1 - Headline 2 - Headline 3 - Headline 4 - Headline 5 TV REPORTS - Headline 1 - Headline 2 - Headline 3 - Headline 4 - Headline 5 etc all displayed at http://www.wrestling-online.com/news/ Now in the setup of the script, the publish URL is listed to post at /news/ . Do I change that to a different one and just create a new index file at /news/ with the current layout and insert the SSI tags to call the headlines? As it is right now, when someone posts in the TV Reports section, it posts at the /news/ URL with the rest of the articles which are part of the News category. If I add the SSI tag to call the TV Reports in the current template, it will show twice on the page, one with the rest of the headlines and one in the TV Reports. Confusing, I know. LOL Colin
|
|
|  |
 |

ColinW-O
User
Jun 29, 2002, 6:52 AM
Post #7 of 12
(4032 views)
Shortcut
|
|
Re: [Dave] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
I created a test page at http://www.wrestling-online.com/news/test.shtml using the layout I need, calling the two SSI tags for the two categories. It works great like that, however I would need to add the 'More Headlines' link. Now I can't use the placeholders since I'm hardcoding the HTML link. What could I do?
|
|
|  |
 |

Dave
Staff
/ Moderator

Jul 1, 2002, 10:42 AM
Post #8 of 12
(3821 views)
Shortcut
|
|
Re: [ColinW-O] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Just hard code a link to the search engine like this: <a href="$url_search$?perpage=10&start=6">More >></a> $url_search$ is the URL to the search engine. That's in the docs here: http://www.interactivetools.com/docs/doc.cgi?/articlemanager/admin/doc_page40.html The "perpage" value is how many articles to show per page, and the "start" value is how many articles to skip over before we start showing results. > is an HTML entity for (another way to write) ">". We do that just so the browser knows we want that character and not anything to do with HTML tags. Hope that helps. Oh, wait! I just remembered you said you're hardcoding this page so you can't use placeholders... In that case, just put in the full URL to the search engine (eg: http://.....). Dave Edis - Senior Developer interactivetools.com
(This post was edited by Chris on Jul 1, 2002, 11:53 AM)
|
|
|  |
 |

ColinW-O
User
Jul 10, 2002, 2:57 PM
Post #9 of 12
(3583 views)
Shortcut
|
|
Re: [Dave] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Alright I'm getting VERY close to what I want. LOL. I'm calling the category headlines via SSI and hard coded the HTML link to 'additional news' since I only have the top 15 headlines. For the TV reports I created another template, which is the exact as the normal news one, but it's set to publish to tvreports.html instead of default.html . I'm doing the same for any additional categories I will create. One final question and I think I may have this set up :) What is the file I have to edit to change the look of the files I'm calling via SSI? I need to add either a "-" or some other sign before every news so they look better. I edited the headlines_bycat.html file in the templates directory of my CGI dir but that didn't change the look. Everything at http://www.wrestling-online.com/news/test.shtml Thanks, Colin
|
|
|  |
 |

Dave
Staff
/ Moderator

Jul 10, 2002, 3:10 PM
Post #10 of 12
(3582 views)
Shortcut
|
|
Re: [ColinW-O] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Colin, Great to hear it's coming along! :) The default template that shows the top headlines for a specific category is "/templates/headlines/default.html". So edit that and republish and you're good to go. "/templates/headlines_bycat.html" is for another include that shows the top headlines from ALL categories sorted "by category". One last thing, if you actually want to change the look of the headlines for one category, but not another, you can create another template file in the "/templates/headlines/" folder, click the category you want to edit in the category editor, and select a different template for "Latest Headlines" from the pulldown menu. It will show you a pulldown of all the templates available for each type of page with the default one selected. Hope that helps! Dave Edis - Senior Developer interactivetools.com
|
|
|  |
 |

ColinW-O
User
Jul 10, 2002, 3:35 PM
Post #11 of 12
(3580 views)
Shortcut
|
|
Re: [Dave] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
It looks good now. I had to remove the cat_headlines_ placeholder from the 'article' template since it was showing 15 top headlines on the right border instead of the normal 5. I replaced that with the Global Headlines, which is set to display 5, both for news and TV reports. The only drawback is that it shows all the headlines for all categories and not the latest headlines from each category. I don't think there's a way around that since I'm using 15 headlines by category on the main page. Ideally it would be 15 on the main page, and 5 on each article posted on the right hand side. But oh well, still happy. BTW - this must be a record for views for one topic...664 views..seesh! LOL
|
|
|  |
 |

fraser_itools
Staff

Jul 11, 2002, 12:25 AM
Post #12 of 12
(3571 views)
Shortcut
|
|
Re: [ColinW-O] Different categories displayed on same page
[In reply to]
|
Can't Post
|
|
Well, I made a mention of this specific conversation our latest newsletter, so that may have helped. ;-) Fraser Cain - Product Manager interactivetools.com, inc. Tel: (604)689-3347 - Fax: (604)689-3342 - Toll Free: 1(800)752-0455 Software for your Website - http://www.interactivetools.com/
|
|
|  |
|