66h3m3ab
66h3m3ab

Reputation: 1148

Custom block in Smarty

Basically, I'm currently working on a website that has a part for logged in users. I'm using Smarty for templating, and right now I check the session in a Smarty if/else block.

Is there any way I can make my own, custom block that would only show up when logged in? i.e. {loggedin}<ul with user menu />{/loggedin}?

I really don't know what this would be called or what the technical aspects of this would entail. If anyone can even point me in the right direction that would be very helpful.

Upvotes: 0

Views: 259

Answers (1)

Progman
Progman

Reputation: 19555

Use the register_block() function to add your own smarty block.

Upvotes: 1

Related Questions