EE template structure
Posted: 13 September 2008 05:03 PM   [ Ignore ]  
Summer Student
Total Posts:  8
Joined  08-14-2008

I have continued to read the forums and look at the documentation for EE over the past couple of weeks. As best I can tell templates are tightly bound to the directory structure - e.g. your template structure replicates your directory(ies). Is this correct?

I may have misinterpreted. Or, I may be correct and this may be a common practice that I don’t know anything about since I have only used one CMS.

But if true this would seem to mandate two things:
1) Whenever I want to deploy a new page I need to deploy a new directory
2) I need to create templates in the new directory, even if they are duplicates of existing templates.

Neither of these things make sense to me and I am having trouble understanding, so I want to be sure I have this part right before I ask much else. Thanks.

 Signature 

Cordially,
- twf
===================
Terry Frazier
Atlanta, GA

Profile
 
 
Posted: 13 September 2008 05:34 PM   [ Ignore ]   [ # 1 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2419
Joined  12-06-2002

Hi Terry -


EE will be a bit of a paradigm shift for you in this area.  Everything past index.php is virtual.  There will be no directories on your server that match what you see in the URL.  You can create template groups and templates without touching the folder/file structure on the server.

 Signature 

Sign up for Southern Fried ExpressionEngine - a 4-day EE class in San Antonio, TX starting on January 20th.

Profile
 
 
Posted: 13 September 2008 05:44 PM   [ Ignore ]   [ # 2 ]  
Research Scientist
Avatar
RankRankRankRankRankRank
Total Posts:  6610
Joined  04-15-2006

Terry,

One other thing to note as well is let’s say you had a link like this in your site :

http://www.example.com/news/detail/expressionengine_rocks

If you break that down into its component parts you get this :

Template Group
news

Template
detail

Entry Title (Also known as URL Title)
expressionengine_rocks

An important part to note here is the simple fact that you could have literally thousands upon thousands of entries in just one weblog which would all use that same template group and template structure and all that would change would be the URL title. This enables you to show all those entries dynamically on the fly without having to create a new page or template every time.

If you imagine that you have a document all laid out with Lorem Ipsum text but styled exactly how you want so the titles are bold the main text is smaller and so on and so forth then just one ExpressionEngine template can handle this for all your entries in the system. Obviously you can use, and will probably want to use, more than one template throughout your site but in the absolute most simplest form this is what you can do.

This makes ExpressionEngine (in my eyes) simply the most powerful publishing platform available and a breeze to work with. Admitted there can be a learning curve but once you have the “light-bulb” moment as lots of people like to call it then really you start to wonder how you ever got by without it.

Hope this helps a bit and welcome to the forums.

Best wishes,

Mark

 Signature 

Full List Of Plugins Here!! (16)
 
Retrieve Statuses
Maximum Posts Reached
Neat Link
Redirect
Fetch URI

Profile
 
 
Posted: 13 September 2008 06:10 PM   [ Ignore ]   [ # 3 ]  
Summer Student
Total Posts:  8
Joined  08-14-2008

Thanks Michael,

Michael Boyink - 13 September 2008 05:34 PM

EE will be a bit of a paradigm shift for you in this area.  Everything past index.php is virtual.  There will be no directories on your server that match what you see in the URL.

I am comfortable with this. I am also comfortable with the concepts of template types and embedded templates. But it still leaves me a little confused on the template/page association. Is it necessary to copy a template to use it in multiple places?

e.g. If I want users to see about/terry.html and about/sally.html, do I have a single “about” template? Or do I have an about group with “terry” and “sally” templates?

Another way of asking this is: if I want to change the layout such that about/terry.html and about/sally.html have a LH sidebar instead of RH sidebar, how many templates would I need to change?

I am sorry if this is a completely thick question.

 Signature 

Cordially,
- twf
===================
Terry Frazier
Atlanta, GA

Profile
 
 
Posted: 13 September 2008 06:21 PM   [ Ignore ]   [ # 4 ]  
Lab Technician
Avatar
RankRankRankRank
Total Posts:  2419
Joined  12-06-2002
twf - 13 September 2008 06:10 PM

Is it necessary to copy a template to use it in multiple places?

e.g. If I want users to see about/terry.html and about/sally.html, do I have a single “about” template? Or do I have an about group with “terry” and “sally” templates?

In this case you would have an about template group, use the index template, and use it to display entries from an About weblog, with at least two entries - one with a url_title of terry and one with a url_title of sally.  When using the index template you don’t have to include it in your links, so it disappears from the url structure.

Note that you won’t have the .html exension with EE.

twf - 13 September 2008 06:10 PM

Another way of asking this is: if I want to change the layout such that about/terry.html and about/sally.html have a LH sidebar instead of RH sidebar, how many templates would I need to change?

I am sorry if this is a completely thick question.

In this case that might be just a CSS change, or if it required a change to the div structure you would just change the index template in the About template group.

 Signature 

Sign up for Southern Fried ExpressionEngine - a 4-day EE class in San Antonio, TX starting on January 20th.

Profile
 
 
Posted: 13 September 2008 06:26 PM   [ Ignore ]   [ # 5 ]  
Summer Student
Total Posts:  8
Joined  08-14-2008

Thank you Mark,

This partially answers the question I just posted above to Michael.

Mark Bowen - 13 September 2008 05:44 PM

Terry,

One other thing to note as well is let’s say you had a link like this in your site :

http://www.example.com/news/detail/expressionengine_rocks

If you break that down into its component parts you get this :

Template Group
news

Template
detail

Entry Title (Also known as URL Title)
expressionengine_rocks
[...snip…]

Is it correct to say that display URLs are created by the template structure then?

I think this is what I am struggling with. In my current system templates are completely separate from both directory structure and display URL.

 Signature 

Cordially,
- twf
===================
Terry Frazier
Atlanta, GA

Profile
 
 
Posted: 13 September 2008 06:27 PM   [ Ignore ]   [ # 6 ]  
Summer Student
Total Posts:  8
Joined  08-14-2008

Ok, thanks guys. I think I have it now.

 Signature 

Cordially,
- twf
===================
Terry Frazier
Atlanta, GA

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 09:33 AM
Total Registered Members: 65085 Total Logged-in Users: 31
Total Topics: 82222 Total Anonymous Users: 17
Total Replies: 441913 Total Guests: 228
Total Posts: 524135    
Members ( View Memberlist )
Newest Members:  BombermanhaimtuagocsadamVeNeaDoRHildegaardhrtrulzUNFORGIVEN IIIEmmanuelYanYanTomsB