This question has been answered by multiple community members. See the first response.
How are you calling getResources, what are you trying to call into it ?&Quote from: benmarte at Aug 12, 2013, 10:34 AM
What does your getResource call with parameters look like?I just tried to call the plain array to see whether it worked at all. And it did at first, I had the array that showed all properties. But since then I can't even reproduce this array.
What does your tpl chunk look like?
If your adding your menus as TV's then you will need to include the &includeTVs, &processTVs&
You should be able to do something using a Template Variable with a date input type to activate the menu for whatever week you need.I didn't want to add the menus as TV's because I didn't think they could be published/unpublished by date without publishing/unpublishing the resource I place them in.
The more info you can give the easier it will be to solve&
We need more information besides it won't work.I'm working on that
I figured out, however, that this might take a little more time. I will, if you allow, come back to my question, when I have more time. Good luck.Thank you
With getResources, you can add a "where" filter parameter to get all the resources by standard resource fields, such as "published".
<code>
[[!getResources? &parents=`[[*id]]` &where=`{"published:=":1}` &tpl=`myRowTpl`]]
</code>
If you have all your menu resources in a folder, you can set the parent to the id of that folder.
You can then set the pub date and unpub dates for the menus. This way you have less TVs to process and use existing fields in the resource database record (Processing resources by TVs can get a bit slow since it has to reference a second table for the info).
[[!getResources? &includeTVs=`1` &processTVs=`1` &showHidden=`1` &parents=`21` &where=`{"published:=":1}` &tpl=`mittag` &limit=`1`]][[!getResources? &includeContent=`1` &showHidden=`1` &parents=`21` &where=`{"published:=":1}` &tpl=`mittag` &limit=`1`]]Again, what are you trying to pull in ?
If the menus are added as TV's then you need to tell getResources to include them:
[[!getResources? &includeTVs=`1` &processTVs=`1` &showHidden=`1` &parents=`21` &where=`{"published:=":1}` &tpl=`mittag` &limit=`1`]]
If you want to pull in the content of the wysiwyg then you need to include the content:
[[!getResources? &includeContent=`1` &showHidden=`1` &parents=`21` &where=`{"published:=":1}` &tpl=`mittag` &limit=`1`]]
What's in your mittag chunk ?
<div id="menu">[[*content]]</div>
Try:
<div id="menu">[[+content]]</div>