|
| :: Products :: Support :: Purchase :: About
|
How to: News Options - Insertion Orders An Insertion Order is: A HTML comment which directs Creative News to publish news on a web page.
Insertion orders can be used to limit the news which is published on the news page in several ways.
An Insertion Order consists of a HTML comment tag, an unique number, and news switches. Here is a very basic Insertion Order (IO): <!--ANM-0-" -c='Top Stories' "--> The category of articles to publish is specified with the news switch "-c='Category Name' ". This IO will add all of the articles in the category 'Top Stories' to the web page. Insertion Orders must have a Unique Number. In the example above, '0' is the number used. If '0' was used on another web page, the last insertion order encountered would be used as default, and there would be a duplicated section of news. Each IO must also have a corresponding closing tag: <!--ENDANM-0-->
If you wanted to include articles from all of the sub-categories in 'Top Stories' you can add another news switch (-i='yes or no'): <!--ANM-0-" -c='Top Stories' -i='yes' "--> <!--ENDANM-0--> News Switches: There are currently 6 news switches. Switches must be placed between the Quotation marks in an Insertion Order: <!--ANM-0-" Switches go here "--> Each switch is listed in the table below.
Switch ( -c=' ' ) Explained This switch selects the category of news that will be published. If you would like articles from all categories, use the example switch below: -c='x' When you have sub-categories of news, use this switch in combination with the (-i='yes') switch. This will allow you to publish articles from the main category, plus articles from sub-categories. To publish Articles from one sub-category only, enter the full category name. You can use the 'Edit Article Form' for reference. Example Insertion Order of the Category 'Oil City' which is a sub-category of 'Top Stories': <!--ANM-1000-" -c='Top Stories:Oil City' -i='no' "--> This will publish news from the Category 'Top Stories:Oil City' but it will not publish articles from 'Top Stories:Oil City:Government'. If you modify the switch (-i='no') to (-i='yes') it will publish news from both categories. Switch ( -n=' ' ) Explained The news switch (-n=' ') is used to select the number of articles you would like to add to a page. Here is an example: <!--ANM-2000-" -n='5' -c='Top Stories' "--> This will publish the top five articles from the category 'Top Stories'. Creative News will select the five articles with the HIGHEST order-numbers for publishing, unless another sorting option in used. You can select any number (positive numbers only) of articles with the (-n=' ' ) switch. Switch ( -i=' ' ) Explained The (-i='') switch is used to specify whether articles from sub-categories of the specified category will be published. The default value for this switch is 'no'. If you do not want sub-category articles to be published, you do not need to use this switch. If you do want sub-category articles published, add this switch to the Insertion Order as shown: <!--ANM-3000-" -c='Top Stories' -i='yes' "--> <!--ENDANM-3000--> If there are articles in the sub-category 'Top Stories:Oil City', they will be published with the articles from 'Top Stories'. See the (-c=' ') switch for a more in depth explanation. Switch ( -s='' ) Explained The (-s='') switch is used to sort articles with one of 24 sorting options. Article can be sorted based on the alphabetical or numeric order of any article field. The sort can also be reversed by prefixing 'reverse.' to any sort method. Here is a table of all of the sorting options.
Example: <!--ANM-3500-"
-c='Top_Stories' -s='priority' "--> Switch ( -d=' ' ) Explained This is probably the most useful switch. With (-d=' ') you can select articles to publish from any day. There are several formats for selecting articles based on there date. The most logical is to simple enter the date of the articles you would like to publish. Example: <!--ANM-4000-" -d='07/07/2002' -c='x' -i='yes' -n='x' "--> This will cause ANM to publish all of the articles that were added on '05/07/2002'.
The only problem with specifying the date is that when tomorrow rolls around, you will need to change the date switch to '07/08/2002'. That is where Date Substitutes come in handy. Date substitutes can be used to select articles from Today, Yesterday, This Week, Last Week, This Month, Last Month, This Year, Last Year, x Days Ago, Last x Days.....etc. Here is an example with the Date Substitute 'Today'. <!--ANM-4005-" -d='today' -c='Top Stories' -n='5' " --> <!--ENDANM-4005--> Fairly easy.... Here is a table with other available Date Substitutes:
Switch ( -dt=' ' ) Explained The (-dt=' ') is a Design Template Override. Each Article can have its own Design Template when it is saved. If you would like articles to be displayed with a standard Design Template, you can use the (-dt=' ') switch to override each articles Design Template (DT). Here is an example. The column of news on the left has an insertion order that does not contain the Design Template Override (DTO) option. The column of news on the right was imported via a Insertion Order that does contain a DTO. The news on the left is formatted with the DT selected for each article. The news on the right was formatted with the DT selected to Override each articles DT.
The Design Template Override option was added to allow news to be formatted with the DT selected for each article on one page, while allowing another page to contain another style with the same format for each article. To Override Design Templates, add the (-dt=' ') switch to your insertion order, with the Design Templates name as the value. Here is an example use of a Design Template Override. <!--ANM-5000-" -c='Top Stories" -d='today' -n='5' -i='yes' -dt='Top Stories' "--> <!--ENDANM-5000--> If you specify a Design Template that does not exist, news will not be placed on the page. It will appear as thought there was no news that fit the Insert Order's specifications. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||