Hi,
I would like to add a chunk to some pages but need a TV within it. My first thoughts were to use a TV referencing a document that uses another templete with just additional HTML needed, and this would have a TV embedded that could be used to add the page specific content. However when I call the document, its template is not called with it. I know, I could always add the HTML around the content within the document (and drop the template idea), but I was looking for tidier solution. Another solution would be have a second template with the addition HTML needed and set up a TV within that, but two templates mean two templates to maintain. Is there a simple solution I’m missing? If not, I guess I will just use a second, alternatve, template for the pages that need the extra content.
No sure if I understood. But my recommendation would be to use a conditional statement (either a snippet or with PHx) to load the chunk with the additional html when needed.
As for putting a TV in a chunk, this should work I do it all the time. If it is not parsing, then change the snippet call to uncached [!snippet!] rather than cached [[snippet]].
@ Colin
yeah I did that thing with additional template, when I needed flash player ( when I embed it myself ) so basically I had two templates, one basic one, for all pages, and the same modified template with flash player( to use only for page where its needed, you can call it extra content ;-) ), ’am still a bit confused on how to use TV’s for this kind of stuff so I can stick just to one template...
@All
Now I came into situation where I need different images for each page, situation is : for each page, I have different
image that represents the page you’re currently on, example : when you’re on contact us page you have contact us img. and so on, about us..etc...
I’ve been thinking about this, and I found out that ’am still a bit confused about how this could be achieved in modx and not using separate template with just that additional content, I suppose it can be done with TV’s but ’am just confused...
Any hint/help in solving this would be great!
Thanks for reading! ;-)
Igor