Jump to content

[SOLVED] Hide cms page until login


Recommended Posts

you can use simple if condition in cms.tpl file, 

something like

 

{if $logged}

CONTENTS OF CMS.TPL HERE

{/if}

 

Hi.

 

I'm sorry but i kinda don't understand.

 

let me explain again.  :)

 

 

I want to hide only one cms page. Not all of it. only user can see this page.

Because that page is order page. Visitor can't see it. 

 

Right now i add this cms page to mega meun but i'm not hide yet.

 

It's alright if you write the code for hide cms page for me ?

 

Thanks again.

 

Ps. id_cms=40

Link to comment
Share on other sites

hello,

i don't understand well your demand.

you just want original cmsController and cms.tpl file? 

or ... what?

yup...

not only the file, but the whole folder of cms and the address that i should change it to really new 1...

help me Vekiaaaaaaaaaaaaa :)

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 year later...

Would this work to hide a cms category?

I've tried it with the following:

{if $smarty.get.id_cms_category==4}
{if $logged}
{$cms->content}
{else}
{l s='access forbidden, please log in first to view this page'}
{/if}
{else}
{$cms->content}
{/if}

However, I have not yet managed to get it to work, basically, nothing happens, nothing gets 'hidden/blocked'.

Individual pages work fine.

Any suggestions, would it be possible to use this code to block multiple pages? If so, how?

I really need to properly start learning php :huh:

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...