Part of the EllisLab Network
   
 
Global templates possible?
Posted: 15 May 2008 05:48 PM   [ Ignore ]  
Summer Student
Total Posts:  3
Joined  04-26-2008

Hello,

this is my first question here. (my english might be not so good)

To my question:

Is it possible to load some ‘default’ layout-tags into every layout-file? For example the head-tags and the bottom of a html-document? Is a simple include enough?

Thanks for your answer.

Greetings from Germany

 Signature 

Life’s too short to be wasted - Tobias Sammet, Edguy.de

Profile
 
 
Posted: 15 May 2008 07:36 PM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1249
Joined  01-07-2008

You can nest views as much as you want.  Any variables you pass to the parent view will also be available to child views.  Example:

<html>
<
bla bla bla>
<? $this->load->view('header');>?

<
content bla>

<? $this->load->view('footer');?>

The other option is to extend a common controller and load them there.

Hope that helps.  Willkommen, the german crowd is growing :D .

 Signature 

Blog | Twitter | Coffee

Profile
 
 
Posted: 16 May 2008 05:57 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  3
Joined  04-26-2008

Hi Inparo,

thanks a lot.

Now I can simplify my complete app.

How much germans are here araound?

 Signature 

Life’s too short to be wasted - Tobias Sammet, Edguy.de

Profile
 
 
Posted: 16 May 2008 06:31 AM   [ Ignore ]   [ # 3 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  1249
Joined  01-07-2008

You, myself, and I can think of at least one other.  “Three’s a crowd.”

I don’t know to be honest, but I’ve seen a few.

 Signature 

Blog | Twitter | Coffee

Profile
 
 
   
 
 
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 719, on June 06, 2008 10:16 AM
Total Registered Members: 62653 Total Logged-in Users: 33
Total Topics: 77188 Total Anonymous Users: 0
Total Replies: 416684 Total Guests: 209
Total Posts: 493872    
Members ( View Memberlist )