Expand my Community achievements bar.

SOLVED

How to hide a complete page using a condition

Avatar

Former Community Member

Hi,

     What i am trying to do, is to hide a page according to a condition. The condition is in my Table's initialize event. I have tried alot of things, i even tried to simply write in my Table's initialize event : data.page.presence = 'hidden' but it does not work. Even worst, it seems to make that the rest of the script is ignored.

     Anybody has tried to hide a page even if there is still information on it?

Thanks!!

Max

1 Accepted Solution

Avatar

Correct answer by
Former Community Member

Omg i made the worst mistake, i apologize to the community... The correct syntax should have been :

data.page1.presence = "hidden" instead of 'hidden'

View solution in original post

2 Replies

Avatar

Level 7

well you need to use " rather than ' for the presence = "hidden" line but if that isn't the issue try putting the code in a different event. What is the actual code for the condition where the page should be hidden?

Avatar

Correct answer by
Former Community Member

Omg i made the worst mistake, i apologize to the community... The correct syntax should have been :

data.page1.presence = "hidden" instead of 'hidden'

The following has evaluated to null or missing: ==> liqladmin("SELECT id, value FROM metrics WHERE id = 'net_accepted_solutions' and user.id = '${acceptedAnswer.author.id}'").data.items [in template "analytics-container" at line 83, column 41] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign answerAuthorNetSolutions = li... [in template "analytics-container" at line 83, column 5] ----