Okay
  Public Ticket #2825293
using If Else in the css of addons
Open

Comments

  • David started the conversation

    I need to do conditional css based on whether the user selects yes or no in once of the attributes, so I am doing this:

    {% if displaysidelines == "true" %}
    .uc_rainbow_bullets .uc_left_border, .uc_rainbow_bullets .uc_top_border{
    display:block !important;
    }
    {% else %}
    .uc_rainbow_bullets .uc_left_border, .uc_rainbow_bullets .uc_top_border{
    display:none !important;
    }
    {% endif %}


    However it  never seems to trigger the else.


    i do not know what I am doing wrong. I assume {% else %} is a valid construct?


    thanks


  •  746
    Amit replied

    try to do two seperate if 

    one for true one for false 


    {% if displaysidelines == "true" %}
    .uc_rainbow_bullets .uc_left_border, .uc_rainbow_bullets .uc_top_border{
    display:block !important;
    {% endif %}


    {% if displaysidelines == "false" %}
    .uc_rainbow_bullets .uc_left_border, .uc_rainbow_bullets .uc_top_border{
    display:block !important;
    {% endif %}

  • David replied

    Hi.

    No that makes no difference. I had already tried that. it just ignores it.

    I have added the addon here so you can see.


    thanks

    Attached files:  uc_rainbow_bullets.zip

  •   Max replied privately
  • David replied

    Nope.. makes no difference. still just ignores it

  • David replied

    and there are still more issues.

    I made a copy of an add-on, made a copy of the assets folder, renamed it all etc.. but the widget refuses to use the css from the new assets folder.

    Also when I try and set the assets in the widget, it keeps adding the path to the old path without setting the new one. Loads of bugs in this section


    Lastly, I see the possibility of adding an addon into an addon as one of the attributes.. all good, but then how do I edit the contents of the new addon? When I load the widget, it just shows me text with the name of the addon - and I cannot do anything with it.

  • David replied

    I have also discovered that any code added after an If/else is simply ignored. it seems there is a major issue with the if /else construct or the way its being created.


    Please advise ASAP - this is critical for us.

    thanks

  • David replied

    And yet another issue. I have set a section to be hidden on tablet and mobile, but it STILL shows on tablet AND desktop

    I have tried on a brand new page, and same issue.

    Attached files:  Screen Shot 2021-07-25 at 10.57.54 am.png

  • David replied

    We have a MAJOR MAJRO issue

    My co worker was working  on the main page, adding text, saving etc... and then suddenly, at the end of the day NOTHING shows on the page.. I mean absolutely nothing, EVERYTHING is gone.  There are no widgets, nothing.

    When I look in the database, i can see that there should be stuff there, but on the display NOTHING.

    We are supposed to be LIVE TODAY, and this is a TOTAL MESS! I need some URGENT HELP PLEASE.

  •   Max replied privately
  • David replied

    As I have said before, we purchased this on good faith as you were STILL selling it without any disclaimer saying it was discontinued. I now have too much invested in this so need the bugs resolved.

    I did not ask for a recovery - I asked to fix the bug which caused it or at the very least let us know how it could possibly happen.

    There are other bugs I mentioned below which need addressing as well.

    If you are not prepared to fix bugs, I need a full refund and compensation for the costs to me for going this route due to misleading selling tactics. This is very much a breach of simple consumer law