Conditionally Render Markup in Template
-
We’re using the MPG plugin to generate location pages from a provided .csv. The challenge we’re running into is like most data-sets, not every column in the spreadsheet will be populated for each location. For instance, you may have locations that don’t have an
address_line_2
field in a common locations use-case. Or, you may have a spreadsheet with a column that has a boolean value where you want to conditionally render an icon or other markup depending on whether the value is true or false for any given location.
We’ve been unsuccessful locating any documentation around conditionally rendering parts of the template based on a variable being null or having a specific value. Is this supported by the plugin?
One thought we had was hooking into the caching system to try to access that data but in looking at the plugin source code we couldn’t find any hooks to achieve this.
I would think this is a pretty common use-case and must be overlooking something. Any help would be greatly appreciated!The page I need help with: [log in to see the link]
- The topic ‘Conditionally Render Markup in Template’ is closed to new replies.