hello, i am working on a site that has different flash headers for each section.
currently i have created a chunk that contains the flash embed info for each header (ie. {{aboutus}}, {{home}}, etc) and then created duplicate templates, one for each section, where the only difference from one template to the next is the chunk i place in it for the header.
i am well aware that this is a totally bad way to accomplish this. there MUST be a simple way to do it where the header is smart and knows which chunk to drop in somehow. but i can’t figure it out. and i can’t think of what to even search for in the forums to find someone else who’s had this problem before.
because the section’s alias is the same as it’s header’s chunk name, i tried adding the chunk with the ’active page’ tag in place of the chunk name — as in {{[*pagetitle*]}} — but that didn’t work. and really, it wouldn’t have worked all the time anyway, because sub-pages wouldn’t have the correct alias anyway.
any tips would be awesome!
dev_cw just got my nav working in another thread, so i am feeling energized to leech more knowledge from you awesome modx forums peeps! (sorry i don’t have more to give!)
"A great democracy must be progressive, or soon it shall cease to be great, and soon it shall cease to be a democracy." -Theodore Roosevelt
-
☆ A M B ☆
- 24,524 Posts
Use a TV with @INHERIT as the default, then for each section’s parent document edit the TV to have the chunk you want for that section; its children will inherit that TV.
bam!
perfect! thanks!
i’ll create a new thread for my next question since it’s unrelated.
thank you so much scottwell!
"A great democracy must be progressive, or soon it shall cease to be great, and soon it shall cease to be a democracy." -Theodore Roosevelt