Create BSPanel Documentation

Issue #34 resolved
Pascal Brewing repo owner created an issue

<?php $this->beginWidget('bootstrap.widgets.BsPanel', array( 'title'=>BSHtml::button('Advanced search',array( 'data-toggle' => 'collapse', 'data-target' => '#search-form', 'class' =>'search-button', 'icon' => BSHtml::GLYPHICON_SEARCH, 'color' => BSHtml::BUTTON_COLOR_PRIMARY), '#'), )); ?> -- HTML Markup Here -- <?php $this->endWidget(); ?>

Comments (6)

  1. Francis Beresford

    Hi Pascal, is this something I can help with? The example I used in my comment before isn't good for documentation.. here's some better ones.

    Basic Example

    <?php $this->beginWidget('bootstrap.widgets.BsPanel'); ?>
        Panel content
    <?php $this->endWidget();?>
    

    Panel with heading

    <?php $this->beginWidget('bootstrap.widgets.BsPanel', array(
        'title'=>'Panel title',
    )); ?>
        Panel content
    <?php $this->endWidget();?>
    

    Panel with footer (currently in branch dev-master)

    <?php $this->beginWidget('bootstrap.widgets.BsPanel', array(
        'footer'=>'Panel footer',
    )); ?>
        Panel content
    <?php $this->endWidget();?>
    

    Example of a contextual alternative

    <?php $this->beginWidget('bootstrap.widgets.BsPanel', array(
        'title'=>'Panel title',
        'type'=>BSHtml::PANEL_TYPE_PRIMARY,
    )); ?>
        Panel content
    <?php $this->endWidget();?>
    
  2. Francis Beresford

    Also one thing to note is if a user adds a title, it forces output of an h3.. maybe I should make this title tag default to <div> and allow a header tag to be defined?

    Example below.. what are your thoughts?

    <?php $this->beginWidget('bootstrap.widgets.BsPanel', array(
        'title'=>'Panel title',
        'titleTag'=>'h3',
    )); ?>
        Panel content
    <?php $this->endWidget();?>
    
  3. Pascal Brewing reporter

    Also one thing to note is if a user adds a title, it forces output of an h3.. maybe I should make this title tag default to <div> and allow a header tag to be defined? Example below.. what are your thoughts?

    Yes it usefull...

  4. Francis Beresford

    Awesome, thanks for the shout out :) titleTag option is in dev-master. The h3 will no longer render by default.. Example below

    Panel with title

    <?php $this->beginWidget('bootstrap.widgets.BsPanel', array(
        'title'=>'Panel title',
        'titleTag'=>'h3',
    )); ?>
        Panel content
    <?php $this->endWidget();?>
    
  5. Log in to comment