Hi,
I've been stuck on this issue for a while. Maybe it's something very simple that I'm overlooking.
I work with a large set of datapoints (written separately in pages), I try to write all of them into a large json file. I write them one by one. Before I write them to the file I do a DB persist, to set an editable "added_to_json" to "1". I loop through the pages where "added_to_json" is not "1". But I keep getting double entries.
I've been stuck on this issue for a while. Maybe it's something very simple that I'm overlooking.
I work with a large set of datapoints (written separately in pages), I try to write all of them into a large json file. I write them one by one. Before I write them to the file I do a DB persist, to set an editable "added_to_json" to "1". I loop through the pages where "added_to_json" is not "1". But I keep getting double entries.
- Code: Select all
<cms:pages masterpage=k_template_name custom_field="added_to_json!=1" limit="1" >
<cms:db_persist _masterpage=k_template_name _mode="edit" _page_id=k_page_id added_to_json="1" >
<cms:if k_success>
<cms:write "file.json" >...</cms:write>
</cms:if>
<cms:if k_error>
<cms:show k_error/>
</cms:if>
</cms:db_persist>
</cms:pages>