Is it possible to use App connect to show hide elements at the server level? I have use both the (dmx-show) and (dmx-hide), but I am looking to hide/show things like the “Advanced Conditional Region 2.0” used to do with php.
what is it mean server level ?
you can use conditional region .
hi @s.alpaslan, I meant executing the show/hide action at the server level, before the page loads into the browser. I think the Mae conditional region may work, however I have not been able to find how to information on how to use it. I am new to this and was wondering if you know any docs I can look at.
Thanks
Juan
Yes you can do that with SESSIONs
You will just need to handcode some basic stuff
<?php if($_SESSION['session_name']==yourValue){?>
display frontend code
<?php }?>
This is certainly one method, but I thought conditional regions worked at the server level (despite being an App Connect component). The result is certainly not the same as using show/hide dynamic attributes - where the elements are just hidden.
Yes I agree, that in some cases you need not to load some parts of your website, not just hide them. Working with sessions is a nice approach
But do sessions have any advantage over using conditional regions for this particular purpose? (Obviously there might be a particular reason why you want to use sessions rather than other values.)
Well regarding server side vs client side the main difference that hidding on the server side it does not load at all. For example when I create backend UI I prefer loading code (not just hidding) based on user level
I appreciate this. My point is that it seems that using conditional regions (not hide/show) means that the code does not load at all - ie with the same result as using PHP sessions. Do you think this is not the case?
Well yes if conditional region works the same way it could be yes. Just don’t know what happens if someone disables javascript. Of course content won’t load as it should but some info (ex static links) might be revealed. In general I prefer hidding ‘crucial’ content on the server side so this way I am sure that it won’t be loaded at all.
I agree. As far as I can see content within a conditional region isn't loaded if the condition is not met, with or without javascript enabled - so I assumed it is handled server side. It would good to have this confirmed. Perhaps @Teodor could help?