ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Infinite Embedded Templates?

July 08, 2007 10:45pm

Subscribe [3]
  • #1 / Jul 08, 2007 10:45pm

    dshafer

    7 posts

    One of the templates I’d like to design needs to consist of a headline, some body text, a link box, and a graphical image. No sweat.

    But what if I want the body text to consist of 1 or more (with no upper limit) embedded templates each of which consists of a sub-heading and some arbitrary amount of text, arbitrarily formatted? Can that be done in EE or will I need to set an upper bound on how many nested sub-headlined paragraphs a particular entity of this template type can contain?

  • #2 / Jul 08, 2007 10:55pm

    Rick Ellis

    107 posts

    Each template requires processing.  It uses system memory, parsing overhead, database queries, etc., so the more templates you embed, the more server resources you’ll eat up.  Ideally you’ll use embeds for items which are shared across multiple pages, not as a means of managing small bits of content.  For those things you can use global variable, or handle as blog entries, etc.

  • #3 / Jul 08, 2007 11:27pm

    dshafer

    7 posts

    Thanks for the quick answer, Rick. I understand this is a potential resource hole, but I’m too new to EE to know how in the world to approach using a global variable for this task and I’m not at all sure how using weblog entries addresses the issue since I’m IN a weblog entry when I’m trying to solve the problem.

    If I’m hearing you right, it sounds like the best way for me to do this is to just hard-code the sub-headings and sub-fields of content into the template design, allow for a reasonable maximum number of such elements in a given template, and let it go at that. I can live with it if that’s the best way to do this.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases