1. // class Page_Controller extends ContentController
  2. function AllEnglishNews() {
  3. $news = Translatable::get_one_by_locale('BlogHolder', 'en_US');
  4. return ($news) ? Translatable::get_by_locale('BlogEntry', 'en_US', "ParentID = $news->ID", "Date DESC", "") : false;
  5. }
  6. // BlogHolder.ss
  7. <% control AllEnglishNews %>
  8. <% include BlogSideBar %>
  9. <% if SelectedTag %>
  10. <h3><% _t('VIEWINGTAGGED', 'Viewing entries tagged with') %> '$SelectedTag'</h3>
  11. <% else_if SelectedDate %>
  12. <h3><% _t('VIEWINGPOSTEDIN', 'Viewing entries posted in') %> $SelectedNiceDate</h3>
  13. <% end_if %>
  14. <% if BlogEntries %>
  15. <% control BlogEntries %>
  16. <% include BlogSummary %>
  17. <% end_control %>
  18. <% else %>
  19. <h3><% _t('NOENTRIES', 'Sorry, there are no news entries') %></h3>
  20. <% end_if %>
  21. <% include BlogPagination %>
  22. <% end_control %>