Read Carefully:
====================================================================================================================
This file details the structure of any new case statements to be added to the index.php (Controller) page template.
Only the code in this file may be copied used for either new outlooks, or new bulletins. This includes comments
enclosed in /* */ and .
Please note the following:
- page title: the official title that would be displayed on finished product webpage (lowercase).
- keyword: the standard identifier for the product. This will be used when naming the
update/summary textfile as well as sitewide, in all supporting functions.
- type: this should be equivalent to the keyword.
- The term 'case' refers to the block of code bearing the structure:
case 'keyword':
...
break;
- The term 'switch' refers to the block of code encasing one or more cases and bearing the structure:
switch( variable ):
...
endswitch;
Below are examples of the structure of each case statement. These may be copied into the index.php file and modified
as needed.
If a new bulletin is being added:
====================================================================================================================
case 'page title':
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
*/
$avia_config['size'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar';
get_template_part( 'includes/loop', 'page' );
?>
10 ):
$month = ($month -1);
else:
if( $month > 0 ):
$month = "0".($month -1);
else:
$month = 12;
$year = ($year -1);
endif;
endif;
endwhile;
break;
====================================================================================================================
The following functions must be modified in the functions.php file to recognize the new keyword being passed to:
get_latest_bulletin( $year, $month, $type, true, false ).
This can be done by duplicating any 'case' statement and modifying it for the intended purpose by replacing the
keywords and regular expressions.
====================================================================================================================
FUNCTIONS:
- bulletin_exists( $year, $month, $type )
- get_climate_bulletin_update( $type )
- get_latest_bulletin( $year, $month, $type, $image = true, $redirect )
- get_recent_bulletin( $year, $month, $type, $redirect )
WIDGETS:
- Recent_Bulletins_Widget
If a new outlook is being added:
====================================================================================================================
case 'page title':
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-page.php and that will be used instead.
*/
$avia_config['size'] = avia_layout_class( 'main' , false) == 'entry_without_sidebar' ? '' : 'entry_with_sidebar';
get_template_part( 'includes/loop', 'page' );
?>