- // class Page_Controller extends ContentController
- function AllEnglishNews() {
- $news = Translatable::get_one_by_locale('BlogHolder', 'en_US');
- return ($news) ? Translatable::get_by_locale('BlogEntry', 'en_US', "ParentID = $news->ID", "Date DESC", "") : false;
- }
- // BlogHolder.ss
- <% control AllEnglishNews %>
- <% include BlogSideBar %>
- <% if SelectedTag %>
- <h3><% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$SelectedTag'</h3>
- <% else_if SelectedDate %>
- <h3><% _t('VIEWINGPOSTEDIN', 'Viewing entries posted in') %> $SelectedNiceDate</h3>
- <% end_if %>
- <% if BlogEntries %>
- <% control BlogEntries %>
- <% include BlogSummary %>
- <% end_control %>
- <% else %>
- <h3><% _t('NOENTRIES', 'Sorry, there are no news entries') %></h3>
- <% end_if %>
- <% include BlogPagination %>
- <% end_control %>