Developer forum

Forum » CMS - Standard features » Access Pageview.Page.PropertyItem from a page item

Access Pageview.Page.PropertyItem from a page item

Anders Ebdrup
Anders Ebdrup
Reply

Hello,

 

We are working with DW 9 and we have trouble accessing the Pageview.Page.PropertyItem from a Page-item in the page-template.

How is this done?

 

Best regards, Anders


Replies

 
Nicolai Pedersen
Reply

Hi Anders

You should be able to access it using Dynamicweb.Frontend.PageView.Current().Page.PropertyItem

Maybe you could tell us what kind of trouble you have?

BR Nicolai

 
Anders Ebdrup
Anders Ebdrup
Reply

Hi Nicolai,

 

Sorry, I have figured out that the PropertyItem is only accessible if you have saved the proproties section of a page.

Will it be possible that the PropertyItem could be created when the page is created and have the default values from the item before a user has to "save" the page manually?

 

Best regards, Anders

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Hi Anders

Ah, ok.

I am not sure it is a good idea to do that. You probably created pages, and later added the page property item?

NP

Votes for this answer: 1

 

You must be logged in to post in the forum