{{indexmenu_n>90}}
====== Add More Help Boxes ======
**Note:** Due to a bug in Smarty 3.1.8 which was packaged with previous releases, these instructions may not work correctly in older versions of the software.
This tutorial will describe one way to add more "help boxes", like you have on the listing placement process, by re-purposing one of the extra pages as a page to show help contents.
**Warning:** This is an **advanced** tutorial, involving making changes to **template files**.
Before attempting to make changes as described here, be sure you have a **firm grasp of [[tutorials/design/start|the basics]]**.
- In your admin, go to **Design > Manager** and in your template set, inside the main_page section, create a new folder **help_pages**. The full path will be something **similar to** my_templates/main_page/help_pages/.<
- Go into this folder, and create a new template named **test.tpl**. Edit the new file and add something like "Test help!", later you will be adding more contents.<
- Now navigate to **main_page/extra_pages/** and create a new template **help_pages.tpl**.<
- Edit the new **help_pages.tpl** file, and make sure you are on the **<..> Source Code Editor** tab. For the contents, enter the following:
{capture assign='explanation'}
{include file="help_pages/{$smarty.get.help|escape:'url'}.tpl"}
{/capture}
{include file='help_popup.tpl' g_type='system' g_resource='other'}
<
- In admin, go to **Design > Page Attachments** choose one of the extra pages you are not using, in this tutorial we will use extra page 17 as the example. Click **edit** next to the extra page.<
- For the **Default Template**, select **extra_pages/help_pages.tpl** and save the changes. Note that the sub-template attachment does not matter as it will not be using a sub-template in this case. <
- In admin, go to **Pages Management > Extra Pages** and click **edit** for the extra page you chose before.<
- For the **Admin Note**, enter **Help Pages** and save changes, so that you can easily remember which extra page is being used for the help pages.<
- On that same page, make note of the link to the extra page, everything starting with the **index.php** part, you will be using it later. It will be something like **index.php?a=28&b=151**.<
- Now the basics are all set up, it is time to try it out. You will need to use one of the extra pages as a test page. If you still have another extra page not used, it will have the default template attachment **extra_pages/additional_page.tpl**, so we will use that as the test page.<
- In admin go to **Design > Manager** and edit the template **extra_pages/additional_page.tpl**. At the top of the template, add this:
If you used a different extra page than 17, change the b= part to match the link for your own extra page.<
- Save changes, then view one of the extra pages that still uses that template, such as extra page 18. It should have a help icon that when clicked, should show the help lightbox with text "Test Help!". If it does, then you did everything correctly, continue on for how to start using this. If not make sure you followed all the instructions above. <
- To create new help contents, in admin at **Design > Manager**, simply create new templates in the folder you created **help_pages/**. Then use the same code that worked for the test, but at the end of the link where it has **help=test**, replace "test" with the template name, minus the end .tpl. For instance if you create a template file help_pages/how_to_dance.tpl, the URL you would use would be index.php?a=28&b=151&**help=how_to_dance**.<
- Note that if you specify an invalid value for the help= (for instance if the file does not exist), it will show a template error. <
- Also note that the templates you create in the **help_pages/** folder should not try to use modules or addon tags, as any attachments in that template will not be loaded due to how it dynamically includes that template. <