embedded templates format
Posted: 09 May 2008 03:52 PM   [ Ignore ]  
Summer Student
Total Posts:  27
Joined  2008-03-26

Do embedded templates need to have <header> information stripped out?

It would seem that the <header> is needed for the CSS file connect and so it must be in the template but does this cause problems when the final web page is created?

I searched on this subject but couldn’t find anything in the documentation.

Thanks.

Profile
 
 
Posted: 09 May 2008 09:31 PM   [ Ignore ]   [ # 1 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2008-02-26

That would depend on what you’re embedding.

The <head> section does indeed need to be in the page somewhere, but doesn’t have to within each embedded template.

For example, if I had a template (let’s call it featured-posts) that I wanted to embed into another template, I might have something like this:

site/featured-posts

<div id="featured">
  <
h1>These are featured</h1>
</
div>

other template

<html>
<
head>
<
title>Welcome to my site!</title>
</
head>
<
body>

{embed="site/featured-posts"}

</body>
</
html>

The markup within the featured-posts template will simply replace the embed tag in it’s entirety.  It doesn’t do anything more.  No additional markup is added.

Some choose to create a header template to minimize maintenance, but you don’t have to.  So to summarize, you need the <head> to be included somewhere in each template but not within each embedded one.

Make sense?

Profile
 
 
Posted: 10 May 2008 01:46 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  27
Joined  2008-03-26

Thx for yr response.

One final question.

Does the CSS for the embedded template have to be in the header of the embedded template or can it be in the parent?
My preference is to use CSS files so in my case I’m wondering if I can put all the links in the parent or if they must be distributed in the particular template to which they apply.

thx.

Profile
 
 
Posted: 10 May 2008 12:04 PM   [ Ignore ]   [ # 3 ]  
Lab Assistant
Avatar
RankRank
Total Posts:  169
Joined  2008-02-26

The answer again is that it depends on your setup.  You would put the CSS links into wherever the <head> section is.  If you have it within an embedded template, it would go there.  If it’s in the parent template, it would go there.

Profile
 
 
Posted: 12 May 2008 09:16 AM   [ Ignore ]   [ # 4 ]  
Summer Student
Total Posts:  27
Joined  2008-03-26

Thanks.

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 1149, on July 16, 2007 10:33 AM
Total Registered Members: 55804 Total Logged-in Users: 92
Total Topics: 63632 Total Anonymous Users: 43
Total Replies: 342824 Total Guests: 599
Total Posts: 406456    
Members ( View Memberlist )
Newest Members:  genturAaren HofferthYepurijolyITCANEIn-CognitoAndy@F1btwilkinsdhiliusitionsuoxin