6.3.4.2. Item Templates Section
This section contains templates for defining a single item, such as defining a single list or gallery item’s template.
6.3.4.2.1. List Item Template
If you configured the settings under List Type Posts Section, then you have to configure this template so that the list can be created. See List Type Posts Section for more information. The short codes available for this template and their explanations are given in Table 6.5.
Short code | Explanation |
---|---|
[wcc-list-item-position] |
Position of the list item found by the selectors defined in List Item Number Selectors or the number that is automatically assigned for the list item when you enable Insert list item numbers automatically? setting |
[wcc-list-item-title] |
Title of the list item found by the selectors defined in List Item Title Selectors |
[wcc-list-item-content] |
Content of the list item found by the selectors defined in List Item Content Selectors |
Generative short codes | Short codes that generate a value. See Short Codes. |
Custom short codes | The custom short codes defined by you, using the settings under Custom Short Codes Section |
6.3.4.2.2. Gallery Item Template
Define a template for each gallery item found by the selectors defined in
Gallery Image URL Selectors setting. This is mandatory if you want to show the gallery
inside the post. Also, you have to include [wcc-main-gallery]
short code into
Post Content Template. The short codes available for this template and their explanations are
given in Table 6.6.
Short code | Explanation |
---|---|
[wcc-gallery-item-url] |
URL of a gallery item found by the selectors defined in Gallery Image URL Selectors setting. |
Generative short codes | Short codes that generate a value. See Short Codes. |
Custom short codes | The custom short codes defined by you, using the settings under Custom Short Codes Section |
For example, if the gallery item is an image, you can define a template as shown below:
<img src="[wcc-gallery-item-url]">
Let’s assume there are 3
images found by the selectors defined in
Gallery Image URL Selectors setting as http://site.com/image1.jpg
,
http://site.com/image2.jpg
, and http://site.com/image3.jpg
. With the template shown above,
[wcc-main-gallery]
short code will be replaced with the code below:
<img src="http://site.com/image1.jpg">
<img src="http://site.com/image2.jpg">
<img src="http://site.com/image3.jpg">
If the template is defined as shown below:
<li><img src="[wcc-gallery-item-url]"></li>
[wcc-main-gallery]
short code will be replaced with the code below:
<li><img src="http://site.com/image1.jpg"></li>
<li><img src="http://site.com/image2.jpg"></li>
<li><img src="http://site.com/image3.jpg"></li>
To include this as a list in Post Content Template, you can define a template in Post Content Template as shown below:
[wcc-main-content]
<ul>[wcc-main-gallery]</ul>