Unlimited number of content boxes

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Post Reply
Mamphil
Forum Members
Forum Members
Posts: 14
Joined: Wed Feb 22, 2006 12:41 pm

Unlimited number of content boxes

Post by Mamphil »

Hallo everybody,

I tried to find an answer with the forum's search but unfortunately I failed.

I designed a website with several content areas (content boxes). The general idea was to seperate different contents which are shown on one page under one general topic. It's difficult to explain, visit http://www.leo-goettingen.de to understand (content is German, but the texts aren't important).

Of course I could create one template with one content box, a second with two content boxes etc. But it would be hard to add or delete a content box if I need to do so. Last but not least my question:
Does CMS made simple support multiple content areas in one template without specifying how much content areas there will be?

Many thanks in advance!
Mamphil
jelle

Re: Unlimited number of content boxes

Post by jelle »

ah, especially the gastebuch where you got spammed is quite instructive :). The M in milf stands for mädchen?

Anyway, back to the point at hand: no I don't think so, as the editpage code detrmines how many content blocks you need based on the template it is assigned to. How could you use more blocks if you cannot enter the content for it in the first place?

If your number of bocks is variable per page, the I thnk it is better place to use put them in the actual content. Just add all contetn in one or two blocks, then open its html and put some s around it. Not very user friendly, but doable. 
Mamphil
Forum Members
Forum Members
Posts: 14
Joined: Wed Feb 22, 2006 12:41 pm

Re: Unlimited number of content boxes

Post by Mamphil »

Hi!

Thanks for your answer! I got the idea to abuse the news module for this feature. I stripped the summary template (Content -> News -> Summary Template) and inserted my content boxes:

Code: Select all

<!-- Start News Display Template -->
{foreach from=$items item=entry}
<div class="box">
<h1>{$entry->title}</h1>
<div>{eval var=$entry->content}</div></div>
{/foreach}
<!-- End News Display Template -->
In the original template I "forgot" the {content} area, all the contents can be inserted with the news modul. Of course it would be possible to leave one {content} area and create the additional boxes with the news module.

Regards,
Mamphil
jelle

Re: Unlimited number of content boxes

Post by jelle »

The news module has its own templates,  but they do exacly what you just described.
alby

Re: Unlimited number of content boxes

Post by alby »

Mamphil wrote: I designed a website with several content areas (content boxes).
........
Maybe with other insert content?

Code: Select all

From content help:
{content}
What parameters does it take?

    * (optional)block - Allows you to have more than one content block per page. When multiple content tags are put on a template, that number of edit boxes will be displayed when the page is edited.
Alby
jelle

Re: Unlimited number of content boxes

Post by jelle »

no, he wanted a variable number of boxes. if you use content you have to define them beforehand. The news module probably fits better here. (like he already implemented)
Post Reply

Return to “Layout and Design (CSS & HTML)”