This will appear at the top.
Contents
- Paragraph
- Link
- Style
- Image
- Break
- Lists
- Headings
- Information Block
- Table
- Preamble
This is a demonstration of the different text and structural elements possible within Marmot's Presentation Layer.
Sourcecode:
$para = array(
'Magnus es, domine, et ',
mu_make_element('style', array('class'=>'strong') ,'laudabilis valde:'),
' magna virtus tua, et sapientiae
tuae non est numerus. et laudare te vult homo, aliqua portio creaturae
tuae, et homo circumferens mortalitem suam, circumferens testimonium
peccati sui et testimonium, quia superbis resistis: et tamen laudare te
vult homo, ',
mu_make_element('link', array('href' => 'index.php'), 'aliqua'),
' portio creaturae tuae.'
);
$body->add_element('para', null, $para);
Output:
Magnus es, domine, et laudabilis valde: magna virtus tua, et sapientiae
tuae non est numerus. et laudare te vult homo, aliqua portio creaturae
tuae, et homo circumferens mortalitem suam, circumferens testimonium
peccati sui et testimonium, quia superbis resistis: et tamen laudare te
vult homo, aliqua portio creaturae tuae.
Sourcecode:
$para = array('Including ', mu_make_element('link', array('href'=>'http://www.muohio.edu/'),
'links'), ' within a block of text is fairly common.');
$body->add_element('para', null, $para);
$body->add_element('link', array('href'=>'http://www.muohio.edu/'),
'a link');
$body->add_element('link', array('href'=>'index.php'), 'a relative link');
$body->add_element('link', array('href'=>'http://www.muohio.edu/','target'=>'_blank'),
'a targeted link');
$body->add_element('link', array('href'=>'http://www.muohio.edu/',
'title'=>'Visit the Miami University homepage','popup'=>array('name'=>'miami',
'width'=>'600', 'height'=>'500')), 'a popup link');
Output:
Including links within a block of text is fairly common.
a linka relative linka targeted linka popup link
Sourcecode:
$para = array(mu_make_element('style', array('class'=>'strong'),
'Strong'), ' or ', mu_make_element('style', array('class'=>'emphasis'),
'emphatic'), ' text add visual punch.');
$body->add_element('para', null, $para);
Output:
Strong or emphatic text add visual punch.
Sourcecode:
$body->add_element('image', array('source'=>'marmot.png', 'caption'=>'Marmot says hello',
'alt'=>'the Marmot logo'));
Output:

Marmot says hello
Sourcecode:
$para = array('Sometimes ', mu_make_element('break'), ' you need a',
mu_make_element('break'), 'break.');
$body->add_element('para', null, $para);
Output:
Sometimes
you need a
break.
Sourcecode:
$list =& ('ordered_list');
$list->add_element('list_item', null, 'First list item');
$list->add_element('list_item', null, 'Second list item');
$list->add_element('list_item', null, 'Third list item');
$list =& ('unordered_list');
$list->add_element('list_item', null, 'First list item');
$list->add_element('list_item', null, 'Second list item');
$list->add_element('list_item', null, 'Third list item');
$list0 =& ('ordered_list');
$list0->add_element('list_item', null, 'First list item');
$list_item =& ('list_item', null, 'Second list item');
$list1 =& ('unordered_list');
$list1->add_element('list_item', null, 'First sub-list item');
$list1->add_element('list_item', null, 'Second sub-list item');
$list0->add_element('list_item', null, 'Third list item');
Output:
- First list item
- Second list item
- Third list item
- First list item
- Second list item
- Third list item
- First list item
- Second list item
- First sub-list item
- Second sub-list item
- Third list item
Sourcecode:
$body->add_element('head_4', null, 'Output:');
$body->add_element('head_1', null, 'Header 1');
$body->add_element('head_2', null, 'Header 2');
$body->add_element('head_3', null, 'Header 3');
$body->add_element('head_4', null, 'Header 4');
$body->add_element('head_5', null, 'Header 5');
Output:
Header 1
Header 2
Header 3
Header 4
Header 5
Sourcecode:
$info_block =& ('information_block', array('title' =>
'Sample Information Block'));
$info_block->add_element('information_block_item', array('label' => 'Organization'),
'Miami University');
$info_block->add_element('information_block_item', array('label' => 'City'),
'Oxford');
$info_block->add_element('information_block_item', array('label' => 'State'),
'Ohio');
Output:
| Sample Information Block |
| Organization |
Miami University |
| City |
Oxford |
| State |
Ohio |
Sourcecode:
$table =& ('table');
$table_row =& ('table_row');
$table_row->add_element('table_heading',null,'Department');
$table_row->add_element('table_heading',null,'Course');
$table_row->add_element('table_heading',null,'Instructor');
$table_row =& $table->add_element('table_row');
$table_row->add_element('table_data',null,'ENG');
$table_row->add_element('table_data',null,'Freshman Composition');
$table_row->add_element('table_data',null,'P. Burkette');
$table_row =& $table->add_element('table_row');
$table_row->add_element('table_data',null,'MTH');
$table_row->add_element('table_data',null,'Intro to Calculus');
$table_row->add_element('table_data',null,'D. Osborne');
Output:
| Department |
Course |
Instructor |
| ENG |
Freshman Composition |
P. Burkette |
| MTH |
Intro to Calculus |
D. Osborne |
Sourcecode:
$body->add_element('preamble', null, array(
mu_make_element('para', null, 'This will appear at the top.')));
Output:
(scroll to the top)