Page 1 of 1

best way to get page Content

Posted: Sun Apr 10, 2005 4:01 pm
by pishkus
hi,

i'm doing some plugin which gets current page id and grabs its alias, menu text. problem is, i also need the data from the other table content_props, to make it clear the data is in the Content column. I've looked through the code, i assume that probably the new variable (new from 0.8.2 version) $loadprops set to TRUE  in GetAllContent method  is for what i need. but i can't figure it out how to write the code correctly?

if i can get the menutext by $onecontent->MenuText() then is it possible to grab what i need with $onecontent->Properties().. what next?

thanx.

Re: best way to get page Content

Posted: Mon Apr 11, 2005 1:11 am
by Ted
Well, with 0.9.2 you can do: $onecontent->GetPropertyValue('blah').  Before that, I think it's: $onecontent->Properties()->GetValue('blah').

Re: best way to get page Content

Posted: Mon Apr 11, 2005 10:16 am
by pishkus
so you mean that when i use 'return $onecontent->GetPropertyValue('Content')' in my plugin it will return the content value from cms_content_props?
now when i use it, i get a blank value.

Re: best way to get page Content

Posted: Mon Apr 11, 2005 11:58 am
by Ted
I believe it's 'content_en', not 'Content'.  I did this so that there is a place for multilingual pages down the road.