Hello all!
Is it possible to use special code in template files to share different content for Members and Non-Members?
For example (???):
<REGISTERED>You are God</REGISTERED>
<NEWCOMER>You are Nobody</NEWCOMER>
Hello all! Is it possible to use special code in template files to share different content for Members and Non-Members? For example (???): <REGISTERED>You are God</REGISTERED> <NEWCOMER>You are Nobody</NEWCOMER> |
in the admin => builder => page builder you can use the guest or member option per block. |
in the admin => builder => page builder you can use the guest or member option per block. Per block - yes. But I wan't to use special code for members\non-members in html-template's files. |
if you use a php block for that and then you can add the member loggedin check in a if else statement. if member() { |
But I wan't to use special code for members\non-members in html-template's files.
https://www.deanbassett.com |
Bad news. It's impossible to provide different content in FOOTER and HEADER for users\non-members.
But I wan't to use special code for members\non-members in html-template's files.
|
We did not say it was impossible. https://www.deanbassett.com |
why not just use a php block? it allows html so much to do.... |
why not just use a php block? it allows html Because every website has 2 places where we can't use php or html BLOCKS. These places are footer and header. We can't use there any blocks. We can place there a code via html-templates only (_header.html, _footer.html, _sub_header.html, sub_footer.html). |
ah i confused it with blocks so much to do.... |
Put this in inc/classes/BxDolTemplate.php ~ line 1275 (function _parseContent) at the start of the function put this $bIsMember = isMember(); so it will look like this $bIsMember = isMember(); now you can use these "anywhere" throughout your installation in .html files. <bx_if:xx_is_logged_user>Only a logged in user can see this</bx_if:xx_is_logged_user> Note: Better leave the tag names what it is (weird eh? i know), don't try to simplify these that could cause collisions with existing tags. so much to do.... |
The following code works for me, just to share it if someone still searching for another solution: D7.1 in inc/classes/BxDolTemplate.php case 'YOUR_CUSTOM_TEMPLATE_KEY': if ($iProfileId) { |