How Do I Create and Add a Box in Tendenci?

Tendenci has a content feature called Boxes that allows you to add any kind of content that can be generated in a WYSIWYG editor to a Page.  Boxes save time and add flexibility to your Tendenci website template.  

Creating a Box

To create a Box, you will need to be logged in as a superuser on your Tendenci CMS website.  You will find Boxes under Content on the Superuser Navigation Menu at the top of any page on your website:

Tendenci CMS | Add a Box

 

Select "Add" and you will go to a form where you will create your box.  Enter a Title that describes the box and then add the content inside the WYSIWYG editor labeled "Content".  

You can add text, images, media and other content.  The text formatting will maintain the same Heading 1, 2, 3, etc. formatting that is included in your website theme.  

After you have added your content, you can select Permission settings to customize viewing options.  The form automatically checks "Public" viewing - to change the settings - simply click the checkbox to uncheck Public and select "Show" advanced permissions settings to view the different user group and membership levels pertaining to your site.  Select the permissions levels and then you can save the box if you are ready.  

Publishing Status is automatically checked Active and when you save, this will create a box and take you to a list view of all your Boxes:

Content Management Solutions | Editing Boxes

Make note of the Pk number assigned to the box you created.  This will be the number used to add the box to your website.  In the image above, there are 2 boxes numbered 1 and 2. 

Add a Box to a Template

WARNING - This requires some basic knowledge of HTML and in some cases, CSS by accessing the Theme Editor.  Making changes to the Theme Editor presents a risk of damaging and/or breaking the appearance and functionality of your website.  You may not be able to fully restore damaged or deleted templates.  We may or may not be able to help restore part or all of the files damaged and you will incur additional support charges to have us attempt this.

The code to add a box into a template is very simple.  From inside the Theme Editor, select the template you wish to add the box to and determine where you want to place the box.  

Insert the code: {% load box_tags %} {% box x %} where x is the box Pk number you wish to add.  

Click the "Update Template" button and refresh your browser cache.  Navigate to the Page where you added the box to view the box.  

To remove a box, simply delete the {% box x %} code that you added to the template in the theme editor and "Update Template" to save the changes.   

Edit a Box

You can edit a Box by navigating through the top Superuser menu, Content, Box - List and select edit next to the Box you wish to edit.  You can also edit a Box directly from the Page where the Box is located.  

If you are on a Page with a Box, hover your mouse over the Box and you will see a "Edit {Box Title} Box" line that you can click on and it will take you to the Box edit page where you can edit and save your Box content. 

CMS for Business | Tendenci Feature Box