• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is extending views possible?

#1
Hi,
is it possible to extend a view in CI4? I mean I have 2 controller classes (one extending another) and 2 views corresponding to the controllers. The difference between the views is only a minimal and I would be nice to avoid repeating the code of the views somehow. Unfortunately I didn't find if and how can be done. 
The only idea I have is using the same view and manipulating with variables but maybe there is a more elegant solution. Any advice?
Reply

#2
Check out view layouts in the CodeIgniter User Guide

CodeIgniter User Guide - View Layouts
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.