hi everybody,
i want to display some advertisements on the start page of the shop (start.tpl). my problem is, that for every advertisement that i generate in the cms, i have to edit the start.tpl to include it (if it doesn’t overwrite an existing one). here’s an example of the code i’m talking about:
[{if advertisement1 }]
[{ oxcontent ident="advertisement1" }]
[{/if}]
i’m now searching for a dynamic solution for this. i see two ways and i need some help to program at least one of them:
-
i make a loop and check, if there is a CMS-page with ident advertisement1, advertisement2, advertisement3, advertisement4 and so on. if i find one, i include it. i would check 15 idents, because i don’t want to overload the startpage (i think 15 is too much, but … well, who knows …)
-
i need an array of all CMS-pages and check the ident of each, if it starts with the substring “advertisement”. if i find one, i include it. this would be the solution of my choice, because it’s more dynamic than the first one.
for the first solution i already know how to make a loop with a section but i don’t know, how to combine the counter and a string to get the ident, i want to check. on side of the second solution i have the problem, that i don’t know, how to optain a array of all CMS-pages.
can anyone help me?
thanks alot
wayne