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 ('webcore/init.php');
02
03 $Page->title->subject = 'Marco\'s Home';
04 $Page->template_options->title = 'Marco';
05
06 $Page->location->add_root_link ();
07 $Page->location->append ('Marco');
08
09 $Page->start_display ();
10
11 include_once ('news/init.php');
12 $news_app = $Page->make_application (News_application_id);
13 $entry_query = $news_app->login->all_entry_query ();
14 $main = $entry_query->object_at_id (1087);
15 ?>
16 <div class="top-box">
17 <div class="button-content">
18 <?php
19 /** @var MENU_RENDERER $renderer */
20 $renderer = $main->handler_for (Handler_menu);
21 $renderer->num_important_commands = 0;
22 $renderer->display ($main->handler_for (Handler_commands));
23 ?>
24 </div>
25 </div>
26 <div class="main-box">
27 <div class="text-flow">
28 <?php echo $main->description_as_html (); ?>
29 </div>
30 </div>
31 <?php $Page->finish_display (); ?>
32