
ChetW
Staff

Oct 14, 2006, 2:02 PM
Post #8 of 9
(3846 views)
Shortcut
|
|
Re: [fluffballs] Articles are currently added manually on the default page
[In reply to]
|
Can't Post
|
|
Hi, Thanks for the extra information! If I understand correctly you are hoping to have a unique "breaking news" type section that will be displayed at the top of your index page. The breaking news section will display an Article a little bigger and slightly different then the rest of your article summaries also, is this correct? If so what you will want to so is create a uniques template that is applies to your breaking news section, then you will use a server side include to display your breaking news articles based on this custom layout for only these articles. :) The ens result will be a breaking news section that is a little bigger and laid out a little differently than the rest of your article summaries. Does this sound like what you are looking for? If so follow the steps below: 1. To create the custom breaking news template file you are going to strip down the "search_results.html" template file. Login to your web server and navigate to the /templates/search directory, this directory is usually found in your /cgi-bin/. 2. Inside the /templates/search/ directory find and download your "search_results.html" template file to your local computer. Next create a copy of the search_results.html template file, call this copy "breakingnews_search_results.html". 3. Edit your newly created "breakingnews_search_results.html" template file so that it only uses the code needed to display your article summary, the results may look similar to this:
<div style="background-color:#cccccc; padding:10px;"> <!-- template insert :$article_list$ --> </div> <!-- templatecell : row --> <span class="summary_breadcrumb"><a name="$art_num$">$cat_breadcrumb$</a></span><br> <span class="summary_title"><a href="$detail_link$">$art_name$</a></span><br> <span class="summary">$art_summary$</span><br> <span class="summary_date">$art_date$, $art_time$<br clear="all"><br></span> <!-- /templatecell : row --> <!-- templatecell : row_summary --> <span class="summary_breadcrumb"><a name="$art_num$">$cat_breadcrumb$</a></span><br> <span class="summary_title">$art_name$</span><br> <span class="summary">$art_summary$</span><br> <span class="summary_date">$art_date$, $art_time$<br clear="all"><br></span> <!-- /templatecell : row_summary --> <!-- templatecell : row_link --> <span class="summary_breadcrumb"><a name="$art_num$">$cat_breadcrumb$</a></span><br> <span class="summary_title">$art_name$</span><br> <span class="summary">$art_summary$</span> <span class="summary">[ <a href="$detail_link$" target="_blank">Visit Website</a> ]</span><br> <span class="summary_date">$art_date$, $art_time$<br clear="all"><br></span> <!-- /templatecell : row_link --> <!-- templatecell : row_ufile --> <span class="summary_breadcrumb"><a name="$art_num$">$cat_breadcrumb$</a></span><br> <span class="summary_title">$art_name$</span><br> <span class="summary">$art_summary$</span> <span class="summary">[ <a href="$detail_link$" target="_blank">Download/View File</a> ]</span><br> <span class="summary_date">$art_date$, $art_time$<br clear="all"><br></span> <!-- /templatecell : row_ufile --> <!-- templatecell : not_found --> <span class="summary">Sorry, no articles were found.</span><br> <!-- /templatecell : not_found --> <!-- templatecell : img_caption --> <table border=0 cellspacing=2 cellpadding=0 width=$img_width$ align=$img_align$> <tr><td><img src="$img_url$" height="$img_height$" width="$img_width$" border=1></td></tr> <tr><td><span class="image_caption">$img_caption$</span></td></tr> </table> <!-- /templatecell : img_caption --> <!-- templatecell : img_nocaption --> <table border=0 cellspacing=2 cellpadding=0 width=$img_width$ align=$img_align$> <tr><td><img src="$img_url$" height="$img_height$" width="$img_width$" border=1></td></tr> </table> <!-- /templatecell : img_nocaption --> <!-- template insert : $prev$ --> <!-- templatecell : prev --> <!-- /templatecell : prev --> <!-- templatecell : no_prev --> <!-- /templatecell : no_prev --> <!-- template insert : $next$ --> <!-- templatecell : next --> <!-- /templatecell : next --> <!-- templatecell : no_next --> <!-- /templatecell : no_next --> <!-- template insert : $more$ --> <!-- templatecell : more --> <!-- /templatecell : more --> <!-- templatecell : no_more --> <!-- /templatecell : no_more --> You will want to edit the above example so that your actual layout plans are reflected in the "breakingnews_search_results.html" template file. 4. Once you are happy with the results of your newly created breaking news template file save the changes and upload this file to your /templates/search/ directory. 5. Next we will need to edit your index default.html file so that it has the following code:
<!--#include virtual="/path/to/your/search.cgi?search=1&cat=$cat_num$&start=1&perpage=3&template=search/breakingnews_search_results.html" --> To do this navigate to your /templates/index/ directory on the web server and look for your "default.html" template file, download this file to your local computer. 6. Create a back-up of the default.html template file and then add the above bit of code to the spot on your page where you want your breaking news article summaries displayed. 7. The code you have just added is your server side include this code will display your breaking news articles based on the new template you have created (template=search/breakingnews_search_results.html ) and show three breaking news articles (perpage=3) starting at your first article (start=1). 8. Save the changes to your default.html" files and re-upload this file back to your /templates/index/ directory. For the last step you will want to login to Article Manager and republish all your articles, you will now see your breking nes section on your index pages. :) Give this a try and if you have any othe questions please feel free to ask! Cheers, Chet Woodside - Product Specialist support@interactivetools.com [hr][i][url "http://www.interactivetools.com/consulting/"][b]Hire me![/b][/url] 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 [url "http://www.interactivetools.com/consulting/"][b]Priority Consulting[/b][/url].[/i]
|