Jump to content

Hooks add_new - replace


horst
 Share

Recommended Posts

current situation is as follows:

With my MP3-DB I create extended page-objects that have some additional Properties and tweaked Children.

Now I've thought if it would be better to use the 'real' $page variable for that.

Extending it with some Properties could be done like explained in the Hooks-API-Doc: http://processwire.com/api/hooks/#add_new_property

But, I need to tweak the $page->children and $page->childNum.

Is there any chance to do that?

------------

why do i want this to have:

if one is, for example on a album-page, the album-page has no children, because the DB-Structure has sibling branches for albums and songs. But human logic says an album must have children (the songs)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...