Bloxby Support Portal
  • Home
  • Knowledge Base
  • Forums
  • Register
  • Live Chat

Knowledge Base

  1. Home
  2. Knowledge Base
  3. Developer Manual
  4. Extending Bloxby
  5. Extending views

Extending views

  • Created September 16, 2017
  • Author Andrew Ozols
  • Category Extending Bloxby

This article covers how developers can modify Bloxby views without having to modify the original views. The term “views” refers to template files used within the Model View Controller developer paradigm. To learn more about MVC in general and the views in specific, please have a look at this article. To learn more about views specific to the CodeIgniter framework, please have a look at the official CodeIgniter documentation.

As of Bloxby version 1.0.3, it is possible to implement your own custom views while leaving the original view files fully intact. Bloxby will look for a custom version of each and every view file used, if it finds one it will use the custom version. If it does not find one, it will use the default version.

To implement a custom view, simply duplicate the view file you’re looking to customize. Change the name of the copied view to exactly match the original one, but append an underscore “_” to the filename.

For example, let’s assume you are looking to implement a custom version of the sites.php view file found in /application/modules/sites/views/sites.php. Make a copy of sites.php and name it “_sites.php”. Your customized view file will should be located at /application/modules/sites/views/_sites.php.

Bloxby will now always load your custom _sites.php view file instead of the original file.

Within this custom version of the view file, you are free to implement whatever changes you’d like. However, it is important to realize that if an official update is released which includes changes to the original view file (/application/modules/sites/views/sites.php in the above example), these changes will not automatically be applied in your custom version of the view. Therefor, if you’re using custom views, we suggest you check the file listing all changed files (included with each update) to see if any of the original versions were modified. If so, you will need to make sure you implement the modifications in your custom version of the view (that is assuming you actually want those changes; you’re free to leave them out as well and your application should continue to work just fine).

Was this article helpful?

Yes No

Related Articles

  • Extending the front-end
    • 0
    • 1995
    • 1
  • Extending controllers with hooks
    • 0
    • 2568
  • Extending Bloxby
    • 0
    • 2633

Leave A Comment? Cancel Reply

You must be logged in to post a comment.

Knowledge Base Categories

  • User Manual
  • General
    • Frequently Asked Questions
  • Developer Manual
    • Updates
    • Integration
    • Extending Bloxby
  • Admin Manual
    • Managing Blocks & Components

Popular Articles

  • Server Requirements
  • Installation Guide
  • Terms and Definitions
  • How to modify or develop Bloxby
  • How to configure Bloxby page builder

Knowledge Base Authors

  • Andrew Ozols
    Andrew Ozols
    Articles Authored: 138
  • Herbert
    Herbert
    Articles Authored: 4

Knowledge Base Authors

  • Andrew Ozols
    Andrew Ozols
    Articles Authored: 138
  • Herbert
    Herbert
    Articles Authored: 4

Forum Statistics

Forums
11
Topics
1,086
Replies
6,211
Topic Tags
250
© Bloxby 2019, All rights reserved