Seite 1 von 1

include a module output several times in template

Verfasst: Di 26. Apr 2005, 22:03
von quokka
Hi,
Sorry, don't speak German.
I have a container, CMS_CONTAINER[1], text html. It holds important words, seo perposes.
I want to include the output of CMS_CONTAINER[1] several times on different places in a page.
In editor I want to define it's content once and re-use it on page, see example please....
Any help would be highly appreciated!

Also, is there a way of putting the page title in your content or template?
Thanks

<h1>OUTPUT_OF_CMS_CONTAINER[1]</h1>
bla bla <b><h1>OUTPUT_OF_CMS_CONTAINER[1]</h1></b>
bla blabla blabla bla
bla blabla blabla bla
bla blabla blabla bla
<li>OUTPUT_OF_CMS_CONTAINER[1]
etc...

Re: include a module output several times in template

Verfasst: Di 26. Apr 2005, 22:06
von Halchteranerin
quokka hat geschrieben:I want to include the output of CMS_CONTAINER[1] several times on different places in a page.
And what/where is your problem? Just do it. :)

Verfasst: Di 26. Apr 2005, 23:17
von timo
The only thing you cannot do is to include a module with contains CMS_HTML[1] several times.

Write a module like this:

Code: Alles auswählen

$iCounter++;

switch ($iCounter)
{
      case 1: echo "CMS_HTML[1]"; break;
      case 2: echo "CMS_HTML[2]"; break;
      case 3: echo "CMS_HTML[3]"; break;
      case 4: echo "CMS_HTML[4]"; break;
      case 5: echo "CMS_HTML[5]"; break;
}
It's ugly, but it works, until we got some other solution.

Verfasst: Di 26. Apr 2005, 23:29
von Halchteranerin
warum braucht er ein Modul dafuer? Ich habe das so verstanden, dass er den Inhalt von Container 1 mehrfach auf der Seite ausgeben will (warum auch immer!). Dann braucht er doch nur Container 1 an den entsprechenden Stellen im Layout zu platzieren, oder?

Verfasst: Di 26. Apr 2005, 23:34
von HerrB
@timo: I think this is not, what he wants... or?

@quokka: Have you tried, just to do it? I think, using the same container more than once is not a good idea, but I think it is possible to set the same Module for more than one Container on one page - resulting in what you want.

Post the results, we will find a solution.

Regards,
HerrB

Verfasst: Mi 27. Apr 2005, 10:40
von timo
If you really want to include one module several times on a page, just create two containers and apply that one module to both containers in your template.