Dynamic Data Tags

Dynamic Data Tags are a powerful feature designed to help you display dynamic content on your website. By using a simple and consistent syntax, {tag_name}, you can effortlessly insert dynamic content into your web pages.

Some Dynamic Data Tags also support the use of parameters to further customize the displayed content, following the format: {dynamic_data_tag:param1:param2}.

Bricksforge comes with a set of Dynamic Data Tags, allowing you to access dynamic content for various purposes.

Tags

Now we will go through the different Dynamic Data Tags available in Bricksforge. Most of them are accepting parameters to further customize the displayed content. You can use Dynamic Data as well to set the params.

Tip: With a Dynamic Tag like {brf_post_title:{url_parameter:id}}, you can use the URL parameter id to display the title of a post. For an URL like https://example.com/my-post/?id=123, the Dynamic Data Tag will display the title of the post with the ID 123.

Form Calculation

With Pro Forms, you have the possibility to use “Calculation” fields to perform calculations. This Dynamic Data Tag allows you to display the result of a calculation field wherever you want.

Usage: {brf_form_calculation:calculation_field_id:operator:value:operator2:value2}

Example: {brf_form_calculation:fkrdj}

This Dynamic Data Tag accepts some arguments to perform an additional calculation on the result of the calculation field. The following arguments are available:

  • calculation_field_id - The ID of the calculation field to use.
  • operator - The operator to use. Available operators are: multiply, divide, add, subtract.
  • value - The value to use for the calculation.
  • operator2 - The operator to use for an additional calculation.
  • value2 - The value to use for the additional calculation.

If you for example want to calculate 19% tax of a calculated price, you can use the following Dynamic Data Tag: {brf_form_calculation:fkrdj:multiply:0.19}.

Additional Calculation

Since version 0.9.8, you can run an additional calculation on the result of a calculation. This may be useful if you run calculations based on dynamic multipliers, for example for a list of recipe ingredients, which have different weights based on the selected quantity of persons.

Example: {brf_form_calculation:fkrdj:multiply:20:add:2}

This Dynamic Data Tag will multiply the result of the calculation field fkrdj by 20 and then add 2 to the result.

Form Live Value

This Dynamic Data Tag allows you to display the live value of a form field.

Usage: {brf_form_live_value:field_id:fallback}

Example: {brf_form_live_value:firstname:Enter your first name}

This Dynamic Data Tag accepts two arguments to specify the form field to use and a fallback value if the field is empty. The field id is required. The fallback value is optional.

Post Title

This Dynamic Data Tag allows you to display the title of a post.

Usage: {brf_post_title:post_id}

Example: {brf_post_title:4953}

This Dynamic Data Tag accepts a single argument to specify the post to use. If the post ID is not specified, the current post will be used.

Post Content

This Dynamic Data Tag allows you to display the content of a post.

Usage: {brf_post_content:post_id}

Example: {brf_post_content:4953}

This Dynamic Data Tag accepts a single argument to specify the post to use. If the post ID is not specified, the current post will be used.

Post Status

This Dynamic Data Tag allows you to display the status of a post.

Usage: {brf_post_status:post_id}

Example: {brf_post_status:4953}

This Dynamic Data Tag accepts a single argument to specify the post to use. If the post ID is not specified, the current post will be used.

Post Excerpt

This Dynamic Data Tag allows you to display the excerpt of a post.

Usage: {brf_post_excerpt:post_id}

Example: {brf_post_excerpt:4953}

This Dynamic Data Tag accepts a single argument to specify the post to use. If the post ID is not specified, the current post will be used.

Post Date

This Dynamic Data Tag allows you to display the date of a post.

Usage: {brf_post_date:post_id}

Example: {brf_post_date:4953}

This Dynamic Data Tag accepts a single argument to specify the post to use. If the post ID is not specified, the current post will be used.

Post Thumbnail Url

This Dynamic Data Tag allows you to display the URL of the thumbnail of a post.

Usage: {brf_post_thumbnail_url:post_id}

Example: {brf_post_thumbnail_url:4953}

This Dynamic Data Tag accepts a single argument to specify the post to use. If the post ID is not specified, the current post will be used.

Post Meta

This Dynamic Data Tag allows you to display the value of a post meta field.

Usage: {brf_post_meta:meta_name:post_id}

Example: {brf_post_meta:my_meta_field:4953}

This Dynamic Data Tag accepts two arguments to specify the post meta field to use and the post to use. If the post ID is not specified, the current post will be used.

ACF Field

This Dynamic Data Tag allows you to display the value of an “Advanced Custom Fields” field.

Usage: {brf_acf_field:field_name:post_id}

Example: {brf_acf_field:my_acf_field:4953}

This Dynamic Data Tag accepts two arguments to specify the ACF field to use and the post to use. If the post ID is not specified, the current post will be used.

Form WC Variation Price

This Dynamic Data Tag allows you to display the price of a WooCommerce product variation, when using Pro Forms WooCommerce features.

Usage: {brf_form_wc_variation_price:form_id}

Example: {brf_form_wc_variation_price:fkrdj}

This Dynamic Data Tag accepts a single argument to specify the form where the product variation is used.

Loop Index

This Dynamic Data Tag allows you to display the index of the current loop.

Usage: {brf_loop_index:offset}

Example: {brf_loop_index:1}

This Dynamic Data Tag accepts a single argument to specify an offset. If the offset is not specified, the index will start at 0.

Parent Loop Post ID

This Dynamic Data Tag allows you to display the ID of the parent post of the current loop.

Usage: {brf_parent_loop_post_id:level}

Example: {brf_parent_loop_post_id:1}

This Dynamic Data Tag accepts a single argument to specify the level of the parent post. If the level is not specified, the parent post ID of the current loop will be used.