Miami University


Marmot Presentation Layer
Refer to the documentation for
Marmot Development
if you need help
 
Text & Structural Elements

This will appear at the top.

Contents

  1. Paragraph
  2. Link
  3. Style
  4. Image
  5. Break
  6. Lists
  7. Headings
  8. Information Block
  9. Table
  10. Preamble

This is a demonstration of the different text and structural elements possible within Marmot's Presentation Layer.

Paragraph

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.

Link

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 link
a relative link
a targeted link
a popup link

Style

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.

Image

Sourcecode:

$body->add_element('image', array('source'=>'marmot.png', 'caption'=>'Marmot says hello', 'alt'=>'the Marmot logo'));

Output:

the Marmot logo
Marmot says hello

Break

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.

Lists

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:

  1. First list item
  2. Second list item
  3. Third list item
  • First list item
  • Second list item
  • Third list item
  1. First list item
  2. Second list item
    • First sub-list item
    • Second sub-list item
  3. Third list item

Headings

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

Information Block

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

Table

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

Preamble

Sourcecode:

$body->add_element('preamble', null, array( mu_make_element('para', null, 'This will appear at the top.')));

Output:

(scroll to the top)



Marmot
Find out more about
Marmot

more...
PHP
Visit the
PHP site
for more help with PHP
more...
About Miami
Learn more about Miami University.
more...