added query to retrieve all menu items based on page publish status if applicable. Added path variable so that it can be set from the select statement
new methods added to create menu nodes and get menu trees