Hi Matthew and welcome to the Umbraco developer forum :)
Apart from the line where the error happens can you then please also let us know what the error message is? Otherwise it's pretty hard for us to figure out what might be wrong in line 39 :)
Also it might help to see the full code instead of just the snippet to get some context. For instance it's not clear whether the _localBannerNodeId variable has been declared somewhere for instance - Perhaps it's not a string and maybe that's the issue since you're trying to cast it as a string to check whether it's value is null or empty but perhaps it's really an integer?
Can you also please post the full source code that you're working on? I suspect that the error is caused by the fact that the _localBannerNodeId is not a string...
What happens if you try writing the check like you do the _ancestorBannerNodeId? So the if condition looks like this
Any suggestions? - Right Sidebar works but Full Width doesnt
Hi,
Completely new to this so I figured when in crisis this would be the best time to try out the forum....
Can anyone point me in the right direction?
Also, the page will work if I set it to the Right Sidebar template but not the Full Width, which is what I need.
Any suggestions?
Hi Matthew and welcome to the Umbraco developer forum :)
Apart from the line where the error happens can you then please also let us know what the error message is? Otherwise it's pretty hard for us to figure out what might be wrong in line 39 :)
Also it might help to see the full code instead of just the snippet to get some context. For instance it's not clear whether the _localBannerNodeId variable has been declared somewhere for instance - Perhaps it's not a string and maybe that's the issue since you're trying to cast it as a string to check whether it's value is null or empty but perhaps it's really an integer?
Looking forward to hearing from you.
/Jan
Jan thank you for the tips!
Below you will see the error message and the full code!
Sorry - rookie mistake!
Hi Matthew
No need to be sorry :)
Can you also please post the full source code that you're working on? I suspect that the error is caused by the fact that the _localBannerNodeId is not a string...
What happens if you try writing the check like you do the _ancestorBannerNodeId? So the if condition looks like this
Try using this on line 39 in your code.
If this does not solve anything then please post the full source code too and the new potential error message (if this also fails).
/Jan
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.