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(11y 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 5d 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 54% 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

4335d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5fbb351446cdd2b932bab3799f6a317e33044a33b4748b91c7aaaf433abdeb3d?d=identicon)[slax0r](/maintainers/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

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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