S
shapper
Hello,
In my views I usually have some data that I need to pass from the
controller to the view:
Page Title, Page Keywords, GoogleAnalyticsURL, ...
Then on some views I also have other data to pass. For example, on
Post View I have PostViewData which contains a list of posts and some
statistics.
My idea was to pass to every view two objects: PageViewData and if
necessary PostViewData, FileViewData, or any other view data object.
I believe this is impossible ... So what would be the best way to do
this? Maybe create for all my views the following:
* PageViewData
o PageTitle
o PageKeywords
o GoogleAnalyticsURL
Then when necessary I would do the following:
* PageViewData
o PageTitle
o PageKeywords
o GoogleAnalyticsURL
o Extra
On extra I would add PostViewData ... but I am not sure how can I do
this because Extra can be PostViewData or any other object in case of
other views.
Anyway, could someone give me some suggestion on how to project this?
Thanks,
Miguel
In my views I usually have some data that I need to pass from the
controller to the view:
Page Title, Page Keywords, GoogleAnalyticsURL, ...
Then on some views I also have other data to pass. For example, on
Post View I have PostViewData which contains a list of posts and some
statistics.
My idea was to pass to every view two objects: PageViewData and if
necessary PostViewData, FileViewData, or any other view data object.
I believe this is impossible ... So what would be the best way to do
this? Maybe create for all my views the following:
* PageViewData
o PageTitle
o PageKeywords
o GoogleAnalyticsURL
Then when necessary I would do the following:
* PageViewData
o PageTitle
o PageKeywords
o GoogleAnalyticsURL
o Extra
On extra I would add PostViewData ... but I am not sure how can I do
this because Extra can be PostViewData or any other object in case of
other views.
Anyway, could someone give me some suggestion on how to project this?
Thanks,
Miguel