Welcome Guest, Not a member yet? Register   Sign In
Best practice for simple HTML and PHP code reuse in views?

Hi all, I just started using CI, and it looks very promising!

I searched the forum for good ways of reusing and including code in views, but havent found exactly what I am looking for.

I simply want to include pageheaders, footers, simple nav bars and CSS info (yeah I have to have it inline, I cant link it to external css files for this proj. Its for phones. Phones dont like that.)

Until I find a better way, I do this in a VIEW file:

        <?php require dirname(__FILE__).'/../myOwnIncludeFolder/inc.css.xhtml.php'; ?>

Does someone have the correct approach?


The FAQ will lead you in several directions - one of them will satisfy.

Ah, you're right, I found a good answer there!
Thanks for a fast response!

Theme © iAndrew 2016 - Forum software by © MyBB