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->template_options->title = 'News';
04  
05   $Page->location->append ('WebCore', './');
06   $Page->location->append ('News');
07  
08   $Page->start_display ();
09  
10   $demo_url = $Page->resolve_path ('{root}/news');
11   $project_url = $Page->resolve_file ('{root}/projects/view_folder.php?id=4');
12   $renderer = $Page->make_controls_renderer ();
13   $renderer->button_width = '10em';
14 ?>
15 <div class="main-box">
16   <div class="columns text-flow">
17     <div>
18       <p>
19         This is a <a href="./">WebCore</a> application that adds blogging/news
20         in an easy-to-use, attractive package.</p>
21       <ul>
22         <li>Define news <a href="features.php#folders">sections</a> to organize articles.</li>
23         <li><a href="features.php#drafts">Drafting</a> and collaboration mode hides articles until published.</li>
24         <li>Automatically send out <a href="features.php#publishing">newsletter</a> updates.</li>
25         <li>Integrated <a href="features.php#attachments">attachments</a> makes embedding graphics easy.</li>
26         <li>Easily separate <a href="features.php#security">public/private</a> areas.</li>
27         <li>Users can discuss articles with <a href="features.php#comments">comments</a>.</li>
28         <li>...and much more!</li>
29       </ul>
30       <p>Check out a <a href="<?php echo $demo_url; ?>">live demo</a>, the <a href="<?php echo $project_url; ?>">project status</a>
31         or <a href="download.php">download</a> a copy for your own web site.</p>
32     </div>
33     <div class="right-sidebar">
34       <p><img src="media/images/news_box_green.png" alt="News Box"></p>
35       <p>Latest version is <span class="field">3.4</span></p>
36       <p><?php echo $renderer->button_as_html ('Demo', $demo_url, '{icons}buttons/ship', Thirty_two_px); ?></p>
37       <p><?php echo $renderer->button_as_html ('Download', 'download.php', '{icons}buttons/download', Thirty_two_px); ?></p>
38       <p><?php echo $renderer->button_as_html ('Project', $project_url, '{site_icons}products/projects', Thirty_two_px); ?></p>
39     </div>
40   </div>
41 </div>
42 <?php $Page->finish_display (); ?>
43