0

I have in EE a json file that pull the file name ([email protected]) from de database where the name is ok but the output is file_name%402x.jpg

how can I fix that?

{exp:channel:entries channel="json" disable="member_data|paginate" dynamic="off" orderby="hotspot" sort="decs" category="3"}{
    "id": {entry_id},
    "foto_groot": "{foto_groot}{file_name}{/foto_groot}",
    "titel": "{title}",
    "url_ext": "{url}",
    "url_int": "{url_title_path=/}",
    "categorie": "{categories}{category_name}{/categories}",
    {if {current_time format="%U"} - {entry_date format="%U"} < '2500000'}"flagsn":{"nieuw":true },{/if}
    "flags":{"new":{hotspot}} }{if count==total_results}{if:else},{/if}{/exp:channel:entries}
]
}

2 Answers 2

2

You can use variable modifiers. Check https://docs.expressionengine.com/latest/templates/variable-modifiers.html#variable-modifiers

{filename:json}
1

If I use {file_name:json} it add qoutes to the begin and end but did not chance the %40 into @. Use url decode to fix the problem. Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.