I have a problem not being able to get the imagepath with the selected focal point in a pageviewmodel. How do i get access to the focal point values?
Developer forum
E-mail notifications
How to get focal point in PageViewModel?
Replies
Hi Daniel
Have you checked out this thread?
Hi Lars,
Yes i have been looking at the current thread - but did not find the answer.
Hi Daniel
The pageview model it self does not have any images. So you probably have an item on that page where you have a field which is of type file which has an image with a focal point?
Then you have to get a "FileViewModel" which you can do something like this:
PageView.Item.GetFile("MyImage").GetFocalPointParameters()
See the fileviewmode https://doc.dynamicweb.com/api/html/19e8ec30-927a-32fa-dade-9b2fecb63ac3.htm
BR Nicolai
Hi Nicolai,
Do you think it would be useful to also add Width and Height properties/methods to the FileViewModel ?
Might be useful to know original file properties when resizing images.
Thank you,
Adrian
Hi Adrian
It will come with a performance hit, so I would rather not implement that feature as it is not needed very often.
Hi Nicolai,
Understood.
Thank you very much.
Adrian
You must be logged in to post in the forum