Part of the EllisLab Network
   
12 of 12
12
Proposal: View Library (updated x3!)
Posted: 10 June 2008 07:57 PM   [ Ignore ]   [ # 166 ]  
Moderator
Avatar
RankRankRankRankRank
Total Posts:  2828
Joined  01-07-2008

You can get similar functionality by just passing the names in with the view variables and loading them in the layout view.

$data['something'] = 'something';

$data['main_content'] = 'content';
$this->load->view('layout');

And then in the layout view.

<div id="header">
<?=$something?>
</div>

<
div id="content">
<?php $this->load->view($main_content); ?>
</div>

The nested views automatically inherit the data you pass in.  It’s a little longer, but you can probably write a helper to do this pretty well.

 Signature 
Profile
MSG
 
 
Posted: 10 June 2008 08:02 PM   [ Ignore ]   [ # 167 ]  
Grad Student
Rank
Total Posts:  92
Joined  08-23-2007

That’s a great suggestion, hadn’t thought of this. Thanx!

Profile
 
 
Posted: 11 June 2008 06:02 AM   [ Ignore ]   [ # 168 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  162
Joined  02-14-2007

I’m still using a modified version of this View library - if anyone is interested I can fork a thread and we can continue from there.

 Signature 

Trying to do it right the first time! whoops guess that didn’t work out so well…

Profile
 
 
Posted: 11 June 2008 06:07 AM   [ Ignore ]   [ # 169 ]  
Grad Student
Avatar
Rank
Total Posts:  84
Joined  08-01-2007

I’ll second that. I added a few methods too. I need to keep this library alive as I’m using it in a lot of projects.

Can host code to if you want, PM if interested.

 Signature 


http://www.capitalh.net
freelance web developer in london

Profile
 
 
Posted: 11 June 2008 06:12 AM   [ Ignore ]   [ # 170 ]  
Grad Student
Rank
Total Posts:  92
Joined  08-23-2007

I’m interested too! Just started rewriting a lot of code, because I thought the view library was dead.

Profile
 
 
Posted: 11 June 2008 07:13 AM   [ Ignore ]   [ # 171 ]  
Grad Student
Avatar
Rank
Total Posts:  64
Joined  01-12-2007

I’m using a modified version for several months now and I’ve nothing to complain about.
What would you basically like to add to this lib? New features?

 Signature 

http://nemetral.com
http://nemetral.net

Profile
 
 
Posted: 11 June 2008 09:57 AM   [ Ignore ]   [ # 172 ]  
Grad Student
Rank
Total Posts:  92
Joined  08-23-2007

I would like to see this library optimised for 1.6.x, mainly speedwise, and secondly, knowing that this library is maintained and updated makes it a more stable library to base entire applications on. A view library is something you use throughout your application, so if it might become incompatible with new CI versions in the future, you’ll have to rewrite a lot of code.

Profile
 
 
Posted: 11 June 2008 03:21 PM   [ Ignore ]   [ # 173 ]  
Grad Student
Avatar
Rank
Total Posts:  47
Joined  10-31-2006

I’m using it as well.

George

Profile
 
 
Posted: 11 June 2008 04:42 PM   [ Ignore ]   [ # 174 ]  
Research Assistant
RankRankRank
Total Posts:  917
Joined  07-10-2006
gerben - 11 June 2008 09:57 AM

I would like to see this library optimised for 1.6.x, mainly speedwise, and secondly, knowing that this library is maintained and updated makes it a more stable library to base entire applications on. A view library is something you use throughout your application, so if it might become incompatible with new CI versions in the future, you’ll have to rewrite a lot of code.

Ted Wood (Coolfactor) is still around. His last post was on May 23rd. Based on previous posts, it’s my understanding that he is still running CI, but has subclassed many of the libraries (17, I think) in order to meet his personal needs. For all we know, those subclassed libraries could still be based on 1.5.x. Maybe one of us should send a PM or email.

Profile
 
 
   
12 of 12
12
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 819, on March 11, 2010 11:15 AM
Total Registered Members: 120568 Total Logged-in Users: 33
Total Topics: 126614 Total Anonymous Users: 4
Total Replies: 665603 Total Guests: 335
Total Posts: 792217    
Members ( View Memberlist )