Publisher does not support the Fluid field type. Please do not contact asking when support will be available.
If you purchased an add-on from expressionengine.com, be sure to visit boldminded.com/claim to add the license to your account here on boldminded.com.
Ticket: Possible issue with prefix for grid tags?
Status | Resolved |
Add-on / Version | Simple Grids & Tables 1.7.4 |
Severity | |
EE Version | 7.3.15 |
Rick Harrison
Feb 05, 2024
Hiya,
Just noticed a possible issue on one of our sites after upgrading EE+plugins, not sure if its the latest version of simplegrid or if its been an issue for a while and we’ve just not noticed - i had the following (abbreviated) template code (within a bloq):
{steps prefix="st:"}
<div >
{st:image}
<img srcset="{path}_182w_2x/{file_name} 2x"
src="{path}_182w/{file_name}"
alt="{st:heading}" ...>
{/st:image}
<span>{st:heading}</span>
</div>
{/steps}
And noticed it was now outputting {st:heading} unresolved in the html output. If i remove the prefix on the heading field it’s output the heading correctly.
It still resolves the image tag with the prefix (from a little experiment it looks like its handling the prefix when the tag is a tag-pair and ignoring it when it’s a single-tag variable?_
Kind regards,
Rick.
BoldMinded (Brian)
Hi, Rick. Take a look at the docs. Some minor changes were made to how images and general parsing are handled. https://docs.boldminded.com/simple-grids-and-tables/docs/template-tags#file-fields
Rick Harrison
Hi Brian,
The file fields are fine in my example though? The issue seems to be that it’s not respecting the prefix=”xx” attribute on the grid field tag for the single-tag variables within it (but is respecting it for the file field and (presumably) any fields that use a tag-pair)? ie its handling {st:image}…{/st:image} fine but has stopped replacing {st:heading} in the output?
Kind regards, Rick.
BoldMinded (Brian)
Can you please share a screenshot of your field configuration?
And to confirm this is a Simple Grid field, not a Simple Table?
Rick Harrison
Sure - i’ve attached them to the ticket. Yes, it’s a simple-grid field.
BoldMinded (Brian)
I should probably update the docs b/c I don’t think the prefix is necessary anymore. The recent version was a pretty big overhaul in how it parses the fields, it parses it just like a normal Grid field, which doesn’t have a prefix option. I’d suggest just removing the prefix.
BoldMinded (Brian)
Also note your tag needs to be updated, per the docs, if you’re using a tag pair it needs the field prefix.
Rick Harrison
Ah, okay, ta (I didnt twig that was a breaking change from the 1.7.0 change log - i’ll have an audit of our sites and swap them over to the new syntax).