The documentation here: http://docs.composite.net/Functions/Razor/Execute-Other-Functions refers to two ways to execute other functions -- function markup and the @function method. One of the differences between these two methods is when the function will be executed.
I would like to use the function markup (i.e. via the composite content editor) but be able to pass data to my functions from it's parent (either a page or another function). The idea was to use the PageData object to stuff data in and then pull it out when the function executes. However, because i'm using the function markup method which executes the function when the markup is rendered it's never able to pull the data out of PageData because it hasn't been added yet.
Is there a way around this? The scenario is essentially letting my users build templates to display data that is pulled from a database. If i was able to pass the data to all the different functions i could create a way to easily mix and match views to create different layouts.
I would like to use the function markup (i.e. via the composite content editor) but be able to pass data to my functions from it's parent (either a page or another function). The idea was to use the PageData object to stuff data in and then pull it out when the function executes. However, because i'm using the function markup method which executes the function when the markup is rendered it's never able to pull the data out of PageData because it hasn't been added yet.
Is there a way around this? The scenario is essentially letting my users build templates to display data that is pulled from a database. If i was able to pass the data to all the different functions i could create a way to easily mix and match views to create different layouts.