3214 Posts in 848 Topics by 810 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 951 Views |
-
Display custom DataField in Templates inside DataObjectSets

10 July 2010 at 11:42am
Hello,
i have several custom DataFields inside my Page. Inside the templates i can access the default fields by just naming them. Like "$Title" "$MenuTitle" etc.
this works inside Control Loops aswell.
What doesnt work is the same trick with my custom datafields. As soon my pages come inside a dataobjectset it seems the templates cant access my custom fields.
So if i try something like:
<% control Children %>
<a href="$Link" title="$MetaDescription">$myCustomTitle</a>
<% end_control %>
it does not work! As soon i access the page directly like:<% control Page(mypage) %>
<a href="$Link" title="$MetaDescription">$myCustomTitle</a>
<% end_control %>
it works....Probably its somethin trivial....
-
Re: Display custom DataField in Templates inside DataObjectSets

10 July 2010 at 4:22pm
Is myCustomTitle a method on your controller class or on the model? If its on the controller you may not have access to it in a dataobjectset like children as it only stores the model object of the page. To fix this simply move the function from your controller to the model.
| 951 Views | ||
|
Page:
1
|
Go to Top |

