Snap! Websites
An Open Source CMS System in C++
The path plugin is a low level plugin used to dispatch a call to a Snap! Website. This is the one plugin that the snap_child object calls once ready.
The path of the HTTP request is used to determine whether a page exists as is in the database. If so, it uses the page owner information to know which plugin owns that page (most pages are owned by the output plugin.) If the plugin is not currently installed, you get a 404 Plugin Missing error.
If the plugin exists and is installed, we call its execute function. Many plugins will in turn use the layout and content plugins to generate the output.
In some cases, the page does not exist, but a parent of that page exists and allows for dynamic children to be accessed. The char_chart plugin works that way. It has a parent page at the top and all children are dynamically generated. The number of levels for the children is defined using a number in the parent page. In most cases this number will be 1, but it can be however large you need it to be.
Finally, if a page does not exists and no parent allows for the page to dynamically exist, then the path plugin sends a signal to give a chance to any other plugin to take over that page. This allows for single dynamic pages to work (single in the sense that only that one page will be dynamic and not a large set of pages under a parent path.)
If all of these tests fail, the plugin returns immediately, meaning that the output buffer is empty and the snap_child ends up returning a 404 Page Not Found error.
Snap! Websites
An Open Source CMS System in C++