Block syntax
Chris Hall 40
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Block syntax
Chris Hall
OP
40
From: -
From: -
Just wanted to say I LOVE being able to add my own vars and have them parse in the blocks!
I'm really getting a lot of use out of that!
I'm really getting a lot of use out of that!
1 Re: Block syntax
Philipp
From: Austria
Administrator
1342From: Austria
Yes, you can use your own variables.
1 Re: Block syntax
Chris Hall
OP
40
From: -
From: -
Thank you!
Is output a special variable or can I reference my on variables like that?
For example, if I have something like $myGreeting in the php section can I then referece {$myGreetin) in the HTML section?
Is output a special variable or can I reference my on variables like that?
For example, if I have something like $myGreeting in the php section can I then referece {$myGreetin) in the HTML section?
1 Re: Block syntax
Philipp
From: Austria
Administrator
1342From: Austria
You should use a variable like $output instead of using echo. Then you can use {$output} in the HTML part.
I'm testing for a logged in user using this:
However, I haven't found a way to make the php part of the block communicate with the html part.
I tried just moving everything into the php section but I could not update the block without having html.
My goal is to display a standard block if a user isn't logged in and if the user is logged in, display some information about the user (such as user name, userid etc.).