hi,
im using ditto on my website to display summarized newsitems per category as follows:
[!Ditto? &parents=`39` &summarize=`2` &total=`20` &tpl=`BlogTemplate` &tagData=`tvtags` &tagDelimiter=`,` &tagMode=`onlyTags` &tags=`Bedrijf`!]
But when i click the newsitem it will always open in the template i have given to the newsitem (document).
This is ofcourse logical but not what I want.
The website works with 3 different templates. (different for targetgroups (student, teacher and company))
Is there some kind of way to display the newsitem in the template that referred to the newsitem ?
So that way a visitor to the company-part of the website won’t have to read the total newsitem in the template for students (the templates are not the same, so its really confusing).
hope you can help me!
Judging by the silence, can I assume that this is not possible? Or just no one ever needed something like this?
We had a very similar topic recently in the forum. Changing a modx document template "on the fly" (for each visitor) is not possible. What you probably need to do, is define different CSS stylesheets per audience.
With a little snippet - a simple PHP switch() statement - you can include only the stylesheet you want, and hence change the visual look and feel.
e.g. in your Ditto tpl for students you would add a GET parameter to the links like &style=students or ?style=students ( ? or & depends on whether you’re using SEO-friendly URLs or not)