PHPackages                             slaxweb/ci-viewloader - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. slaxweb/ci-viewloader

ActiveLibrary[Templating &amp; Views](/categories/templating)

slaxweb/ci-viewloader
=====================

View Loader for CodeIgniter

1.0.3.0(12y ago)030311GPLv3PHPPHP &gt;=5.3.0

Since Jul 3Pushed 11y ago1 watchersCompare

[ Source](https://github.com/SlaxWeb/ViewLoader)[ Packagist](https://packagist.org/packages/slaxweb/ci-viewloader)[ RSS](/packages/slaxweb-ci-viewloader/feed)WikiDiscussions develop Synced 3w ago

READMEChangelogDependenciesVersions (3)Used By (1)

ViewLoader
==========

[](#viewloader)

View Loader for CodeIgniter helps to load the view, and inject language strings into the view.

How to use
==========

[](#how-to-use)

Initiate the object
-------------------

[](#initiate-the-object)

If installed with composer, include the autoloader and initiate the object, with the CodeIgniter object passed in. Since views should be loaded only in the controller, it is safe to pass **$this**

```
$viewLoader = new \SlaxWeb\ViewLoader\Load($this);
```

Load the view
-------------

[](#load-the-view)

To load the view

```
$viewLoader->loadView("view/file")
```

Include header/footer
---------------------

[](#include-headerfooter)

If you want to include a header and footer view, those must be set before

```
$viewLoader->setHeaderView("header/file");
$viewLoader->setFooterView("footer/file");
$viewLoader->loadView("view/file", $dataArray);
```

Exclude header/footer
---------------------

[](#exclude-headerfooter)

Of course you can set both, or either of them. If you have loaded the header and view, but you want to exclude them for the view that you want to load, pass false, as the third parameter in **loadView**

```
$viewLoader->loadView("view/file", $dataArray, false);
```

Language strings
----------------

[](#language-strings)

View loader provides a possibility to pass your language strings into the view. But so you don't pass all of them, it is limited by prefixes in the key of the language array.

```
$this->lang->load("languageFile");
$viewLoader->setLanguageStrings("prefix_");
$viewLoader->loadView("view/file", $dataArray);
```

This takes all the language strings which have their keys prefixed with "prefix\_" and injects them into the view data to be used as regular variables. So **$lang\["prefix\_myString"\]** becomes **$myString** in the view.

ChangeLog
=========

[](#changelog)

1.0.0
-----

[](#100)

Initial version

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

4382d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1128870?v=4)[slax0r](/maintainers/slax0r)[@slax0r](https://github.com/slax0r)

---

Top Contributors

[![slax0rr](https://avatars.githubusercontent.com/u/3025605?v=4)](https://github.com/slax0rr "slax0rr (17 commits)")

### Embed Badge

![Health badge](/badges/slaxweb-ci-viewloader/health.svg)

```
[![Health](https://phpackages.com/badges/slaxweb-ci-viewloader/health.svg)](https://phpackages.com/packages/slaxweb-ci-viewloader)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
