Developer forum
E-mail notifications
Login system
Replies
rs@condurra.dk wrote:HiI am at the moment trying to think of a way that allows logged in uses to see some text content; And for those who isn’t logged in no content will be displayed.Is this possible with a javascript ?Any good ideas ???- Rasmus Samsig
Hi Rasmus
Not sure I fully understand what you need. But in the page template you can output as a variable in javascript and if this value is more than 0 a user is logged on. Based on that you can display som hidden text.
Will that do the trick?
NP wrote:rs@condurra.dk wrote:HiI am at the moment trying to think of a way that allows logged in uses to see some text content; And for those who isn’t logged in no content will be displayed.Is this possible with a javascript ?Any good ideas ???- Rasmus Samsig
Hi Rasmus
Not sure I fully understand what you need. But in the page template you can output as a variable in javascript and if this value is more than 0 a user is logged on. Based on that you can display som hidden text.
Will that do the trick?
Hi Nicolai
Thank you for the quick reply.
Lets me give you an example:
I want to hide some links from unauthorized people.
Something like this:
No emails shown
How would I use the DwTag in this case ?
My JavaScript skills isn't up to date at the moment.
Thanks again!
-Rasmus
rs@condurra.dk wrote:NP wrote:rs@condurra.dk wrote:HiI am at the moment trying to think of a way that allows logged in uses to see some text content; And for those who isn’t logged in no content will be displayed.Is this possible with a javascript ?Any good ideas ???- Rasmus Samsig
Hi Rasmus
Not sure I fully understand what you need. But in the page template you can output 380as a variable in javascript and if this value is more than 0 a user is logged on. Based on that you can display som hidden text.
Will that do the trick?
Hi Nicolai
Thank you for the quick reply.
Lets me give you an example:
I want to hide some links from unauthorized people.
Something like this:
No emails shown
if($logged_in)document.getElementById("emails").style.display="block";
else document.getElementById("noemails").style.display="block"
How would I use the DwTag in this case ?
My JavaScript skills isn't up to date at the moment.
Thanks again!
-Rasmus
You shouldent do this with javascript at all, as you can just disable javascript and see the information anyway, also remember if its to block out bots, i'm pretty sure they crawl threw the HTML without javascript or anything else, which means they will see it anyway.
I'm not sure that bots index what's embraced in
You must be logged in to post in the forum