Accepts a path in url/unix directory format, e.g. "/page1/page2". Paths are assumed to be absolute, so a leading slash (/) is not required. Returns an array of any pages that exist in the path, starting with "/", and an additional array of "proto page" hahses for any pages at the end of the path that do not exist. All paths include the root (/), which must exist, so a path of at least one element will always be returned. The "proto page" hash keys are:
@path_pages = __PACKAGE__->path_pages_by_id( $id );
Returns all the pages in the path to a page, given that page's id.
Create prototype page objects for each level in a given path.
Strip superfluos spaces, and convert the rest to _, and lowercase the result.
Takes the following args:
returns true if path can be resolved, or false otherwise.
Create a new content version for this page.
args is each column of MojoMojo::M::Core::Content.
__PACKAGE__->set_paths( @pages );
Sets the path TEMP columns for multiple pages, either a subtree or a group of non-adjacent pages.
@descendants = $page->descendants_by_date;
Like descendants, but returns pages sorted by the dates of their last content release dates.
Return popular tags for this page used by other people than <user>.
find or creates a list of path_pages
Opens a gap in the nested set numbers to allow the inserting of new pages into the tree. Since nested sets number each node twice, the size of the gap is always twice the number of new pages. Also, since nested sets number the nodes from left to right, we determine what nodes to re-number according to the rgt column of the parent of the top-most new node.
Returns a new parent object that is updated with the new lft rgt nested set numbers.
return the number of photos attached to this page. use for galleries.