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 = 'Screenshots';
04   $Page->location->append ('WebCore', './');
05   $Page->location->append ('Screenshots');
06  
07   $Page->start_display ();
08 ?>
09 <div class="main-box">
10   <?php
11     include_once ('albums/init.php');
12     $albums_app = $Page->make_application (Album_application_id);
13  
14     $folder_query = $albums_app->login->folder_query ();
15     $folder = $folder_query->object_at_id (149);  // earthli announcements folder
16     /** @var ALBUM_ENTRY_QUERY $entry_query */
17     $entry_query = $folder->entry_query ();
18     $entry_query->set_type ('picture');
19     $entry_query->set_order ('time_created DESC');
20  
21     include_once ('albums/gui/picture_grid.php');
22     $grid = new PICTURE_GRID ($albums_app);
23     $grid->set_page_size (Default_page_size);
24 ?>
25   <div class="text-flow">
26     <p class="info-box-top">These pictures are managed by the <a href="app_albums.php">earthli Albums</a> application.</p>
27 <?php
28     $grid->set_query ($entry_query);
29     $grid->display ();
30 ?>
31   </div>
32 </div>
33 <?php $Page->finish_display (); ?>
34