• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Hidden content if user is logged in - HOW TO?
PostPosted: Mon Apr 24, 2017 1:24 pm 
Offline
Forum Members
Forum Members

Joined: Thu Dec 13, 2012 2:54 pm
Posts: 182
Hello everyone!
I've been looking and searching all around but I can't find a solution for the following problem:

1) There is a link named "Log-in" and it leads to the page with login form. Once user is logged in this link must change to "Log-out".
Is it possible to achieve such change with some smarty magic?

2) There is a log-in form and registration button and below is contact form protected by FEU. Once user is logged in, contact form appears but registration button remains.
Is it possible to hide some elements - like registration button - if user is logged in and obviously doesn't need to register anymore? Again I believe it could be done with smarty but have no clue how to get there...

To illustrate this situation a little bit better, I have created a testing page at:

http://www.adriaticsolution.hr/index.php?page=testing

You can use following for log-in:
username: test@test.com
password: test2017AS

Maybe I'm missing something obvious but I've been struggling with this for days and still can't figure out how to do it. Every hint would be very appreciated!
Thank you all in advance and best regards,
Jakovbak


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Hidden content if user is logged in - HOW TO?
PostPosted: Mon Apr 24, 2017 2:01 pm 
Offline
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Apr 23, 2008 7:53 am
Posts: 7223
Location: The Netherlands
https://www.cmscanbesimple.org/blog/add ... e-features
https://www.cmscanbesimple.org/blog/set ... ers-module

_________________
Image

Did my post help you solving a problem at your (customers) website and it saved you many hours of work? Great!! Consider buying me a cup of coffee in return! [ Click here ]



Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: Hidden content if user is logged in - HOW TO?
PostPosted: Mon Apr 24, 2017 2:19 pm 
Offline
Forum Members
Forum Members

Joined: Thu Dec 13, 2012 2:54 pm
Posts: 182
Hello Rolf and thank you so much! I'm on the bus from work right now and can't try it but from what I have read it could be exactly what I was looking for!
One more question - if it's not inappropriate - about page behaviour after login process:
- If the login process started on page XY like in my example, is it possible at the end of that process to hit some 'back' button to go back to XY page but also to reload the page so that previously hidden contact form is now visible?
Best regards,
Jakovbak


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: shaoran


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting