I have a question regarding to the models builder.
I want to use an approach where I have a general settings node under my website root node. In this note some general settings are maintained like site logo and similar.
Now I don't want to query for that node on each of my templates when I need some information stored in it.
Is there a way to provide content from this node as a property on my generated models?
ModelsBuilder generate property in each model
Hi all,
I have a question regarding to the models builder.
I want to use an approach where I have a general settings node under my website root node. In this note some general settings are maintained like site logo and similar.
Now I don't want to query for that node on each of my templates when I need some information stored in it.
Is there a way to provide content from this node as a property on my generated models?
So I can do
on the pages?
Regards David
Hi David,
What your are trying to do is not possible.
For such kind of scenario's I usually write a extension method no the IPublishedContent object.
That ways it's available on each model.
Dave
Hi Dave,
thanks for the answer.
Sad to hear but yes then I think I will also stick to the extension method to do this.
Thanks!
David
is working on a reply...