Creating ManageArticles.bxm

Our manageArticles.bxm page is going to be split into two columns. On the left will be a list of articles already in our database and on the right will be the form we use to manage the title and text of the article and whether it is active or not.

Bootstrap allows this very easily using its grid system of rows and columns. You can dive into that in more detail on your own here but for now let's start building our page.

We need to add the <bx:output></bx:output> for reasons that should be clear by now. The <div class="row"> uses the CSS from Bootstrap to group all of the <div> tags within it with the col-* class into one row with the correct margins on both side and in between the column.

The "col-size-number" use different breakpoints based on the size of whatever screen on which the page is being viewed to say how wide that column. should be. The Bootstrap grid is based on the width of the screen being 12 columns wide ( Each column therefore being 1/12 of the screen's width ). The number says how many columns wide it should be. The size says "For this size and larger use this many columns". For sizes smaller than the one stated, it will automatically be 12 columns wide or 100% of the screen.

Here are the breakpoints for the version of Bootstrap we are using

Breakpoint TierClass PrefixViewport DimensionsDescription & Target Devices
Extra small.col-xs-< 768pxPhones (horizontal at all times, no collapsing)
Small.col-sm-≥ 768pxTablets (stacked by default, horizontal above 768px)
Medium.col-md-≥ 992pxSmall desktops / laptops (stacked by default, horizontal above 992px)
Large.col-lg-≥ 1200pxLarge desktops (stacked by default, horizontal above 1200px)

Here is the beginning of the page.

<bx:output>
<div class="row">
    <div class="col-sm-3">

    </div>
    <div class="col-sm-9">
        
    </div>
</div>
</bx:output>

Because /finalProject/management/manageArticles.bxm is viewed as an include within /finalProject/management/index.bxm and not on its own, our snippet here already has access to the bootstrap library and will style accordingly.

Lesson 1 of 4 - Creating a CMS