The best way to learn how to use the WebCore is by example. See the documentation for more information.

The requested URL is always shown first; if a page uses one or more WebCore templates, those are shown afterwards.

00 <?php
01   include_once ('software/webcore_init.php');
02  
03   $Page->title->subject = 'Latest news';
04   $Page->location->append ('WebCore', './');
05   $Page->location->append ('News');
06  
07   $Page->start_display ();
08  
09   include_once ('news/init.php');
10   $news_app = $Page->make_application (News_application_id);
11  
12   $folder_query = $news_app->login->folder_query ();
13   $folder = $folder_query->object_at_id (26);  // earthli announcements folder
14   $entry_query = $folder->entry_query ();
15   $num_objects = $entry_query->size ();
16  
17   include_once ('news/gui/article_grid.php');
18   $grid = new ARTICLE_GRID ($news_app);
19   $grid->set_page_size (Default_page_size);
20 ?>
21 <div class="main-box">
22   <div class="text-flow">
23     <p class="info-box-top">These articles are managed by the <a href="app_news.php">earthli News</a> application.</p>
24 <?php
25     $grid->set_query ($entry_query);
26     $grid->display ();
27 ?>
28   </div>
29 </div>
30 <?php $Page->finish_display (); ?>
31