include a module output several times in template

Gesperrt
quokka
Beiträge: 48
Registriert: Sa 12. Mär 2005, 00:07
Wohnort: Tilburg - The Netherlands
Kontaktdaten:

include a module output several times in template

Beitrag 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...
Halchteranerin
Beiträge: 5478
Registriert: Di 2. Mär 2004, 21:11
Wohnort: Halchter, wo sonst? ;-)
Kontaktdaten:

Re: include a module output several times in template

Beitrag 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. :)
timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag 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.
Halchteranerin
Beiträge: 5478
Registriert: Di 2. Mär 2004, 21:11
Wohnort: Halchter, wo sonst? ;-)
Kontaktdaten:

Beitrag 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?
HerrB
Beiträge: 6935
Registriert: Do 22. Mai 2003, 12:44
Wohnort: Berlin
Kontaktdaten:

Beitrag 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
Bitte keine unaufgeforderten PMs oder E-Mails -> use da Forum!

Newsletter: V4.4.x | V4.6.0-15 (Module, Backend) | V4.6.22+
Standardartikelliste: V4.4.x | V4.6.x
http://www.contenido.org/forum/search.php | http://faq.contenido.org | http://www.communido.net
timo
Beiträge: 6284
Registriert: Do 15. Mai 2003, 18:32
Wohnort: Da findet ihr mich nie!
Kontaktdaten:

Beitrag 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.
Gesperrt