Project

General

Profile

Actions

Feature proposal #5947

open

CBLib: Implement layout api

Added by krileon over 8 years ago. Updated about 6 years ago.

Status:
Assigned
Priority:
Normal
Assignee:
Target version:
Start date:
04 May 2016
Due date:
% Done:

0%

Estimated time:

Description

Instead of hardcoding Bootstrap or framework classes create a params array of them mapped to generic names. Example usage with Bootstrap being upgraded from 3 to 4 only needing minor changes.

Bootstrap 3:
Application::Layout()->get( 'box.container' ) // .panel
Application::Layout()->get( 'box.header' ) // .panel-header
Application::Layout()->get( 'box.title' ) // .panel-title

Bootstrap 4:
Application::Layout()->get( 'box.container' ) // .card
Application::Layout()->get( 'box.header' ) // .card-header
Application::Layout()->get( 'box.title' ) // .card-title

This should be done at the same time as Bootstrap 4 upgrade to easy future upgrades. If possible shorten the usage further to something like CBLayout( 'path' ). Shorter the better as this will be used.. a lot.


Files

layout_examples.txt (1.32 KB) layout_examples.txt krileon, 09 May 2016 22:21
Actions

Also available in: Atom PDF