• Resolved Hozefa Saleh

    (@hozefasmile)


    I have created a new block for responsive bootstrap image the code for it is as follows

    {{#compare uni_link_to '==' Custom URL}}<a href="{{uni_custom_link}}">{{/compare}}{{#compare uni_link_to '==' Image}}<a href="{{uni_upload_image.url}}">{{/compare}}<img class="img-fluid {{uni_extra_image_classes}}" src="{{uni_upload_image.url}}" alt="{{#if uni_custom_alt_tag}}{{uni_custom_alt_tag}}{{else}}{{uni_upload_image.alt}}" />{{#compare uni_link_to '!=' None}}</a>{{/compare}}

    I think I am doing something wrong in the code , that is why when I use the block in a page and try to publish the post, its not saving and throwing error “Publishing failed”

    Can you please help me with what doing wrong for html output? I think I am not using the compare tag correctly ? the field “uni_link_to” is a select field, can I use something like uni_link_to.value to get its value and then compare it with a constant text ?

Viewing 1 replies (of 1 total)
  • Thread Starter Hozefa Saleh

    (@hozefasmile)

    Ok I have resolved it, actually I had to use double quote for the static text to compare with, so {{#compare uni_link_to ‘==’ “Custom URL”}} worked! , so to compare with string we have to use double quote

Viewing 1 replies (of 1 total)
  • The topic ‘Error in Saving Page’ is closed to new replies.