SpryPanel Documentation | 3.3. Setting up Onpage Editing
SpryPanel offers you the option of viewing your editing options for a
particular page on your web-site when you are surfing your site. What
this means is that if you are on a page, lets say 'contact us', and you
want to change some of the content on it, you can simply click the edit
content button on the page instead of going through SpryPanel. Please
note that you will only be able to see the editing options when you are
logged into SpryPanel, so that people who are visiting your site won't
be able to edit the content...
To add this feature to your
site, you simply need to call a function in PHP and SpryPanel will do
everything else for you. The functions, how to call them and their use
is shown below.
| Function | Function's use |
| Log-in <?php onpage_editing_login( 'SP' ); ?> | This is a small "SP" text which you can hide some where on your web-site through CSS (the div id is "sprypanel_onpage_editing_login"), so a user can click on it and then log-in to SpryPanel, then continue surfing your site. yo can change the text that will be displayed by changing what is in the quote marks. |
| Icon link display <?php onpage_editing_icon(); ?> | This will display a row of buttons similar to that you can see on the SpryPanel main page. These are the content editing buttons that a user can click to edit content on that page. The div id for this is 'sprypanel_onpage_editing'. |
| Text link display <?php onpage_editing_text(); ?> | This is very similar to onpage_editing_icon, except instead of using small images for the links it uses text links. The div id for this is also 'sprypanel_onpage_editing'. |
| Info in one column <?php onpage_editing_info_one_coloum(); ?> | This function will display the info for the current page, again very similar to what you would find on the SpryPanel main page. This function will display the information a single column table. This div id for this is 'sprypanel_onpage_editing_info' |
| Info in two columns <?php onpage_editing_info_two_coloum(); ?> | Like onpage_editing_info_one_coloum this function will display the information for a page. The difference here is that it will display it in two columns. The div id container for it is the same. |
| Update Information <?php onpage_editing_update_information(); ?> | This function will display the update information that SpryPanel would normally show whenever it performs an operation and updates a page's content. The div used here is 'sprypanel_update_information'. |
| <-- 3.2. Including Controlled Content | 3.4. Plugins --> |