• http://
  • .yourcommunify.com
  • Go!

Dynamic content

Dynamic content in widgets


Dynamic content

We can put dynamic information within widget. Thus, the same plugin can display different content depending on the page being displayed. Usage:
In the HTML, using the data-tag:
- data-cfy-cross-id: Define the identifier.
- data-cfy-cross-value: Define the content.

In our backoffice, using the editor, we have to define where we want to show that variable using the tags defined with double claudator "{{}}".
The elements of valid editor for this functionality are the standard elements:
- Text
- Link
- Image

1.- On the page where the content is displayed:
In some point of the HTML code, we could put the following code:

<div data-cfy-cross-id="club-name" data-cfy-cross-value="FC Barcelona"></div>

2.- On our backoffice editor:
In some point of our widget, for example a text item, we define the variable {{club-name}}.

Once the widget is displayed on the web, we won't see {{club-name}}, instead we will see "FC Barcelona"

Form hidden fields


We can send information that will be added to the form when a lead is generated. The elements key-value of the HTML code will be added to the form as hidden fields.

In the HTML, using the data-tag:
- data-cfy-hidden-id: Define the identifier.
- data-cfy-hidden-value: Define its value.

<div data-cfy-hidden-id="cta" data-cfy-hidden-value="dummy_cta"></div>

In this case, the element 'cta' will be added into the form as a hidden field with the value 'dummy_cta'.

Dynamic language


We can send by parameter the language of the the plugin which we want to be displayed.

Usage and example:
<div data-cfy-cross-language="es"></div>

On our backoffice editor we can have a plugin multi language enabled. Guess we have two initial pages, one in English (es) and the other one in Spanish (es). The plgin will be displayed showing the spanish initial page.