inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 19, 2017 0:15:48 GMT -8
URL: wearehuman.boards.net/page/dashboardI'm trying to create a page that I can effectively target information depending on if it's a guest viewing (in which case I want the want ads and plot arcs front and center) or a registered member (in which case I want the stuff at the top viewing). So I thought okay well I can use layout template variables to do this. Apparently not. You can't contain $[zone.1] etc inside {if} or {foreach} loops. Now I'm not sure why but given most people will be wanting to use dynamic content on their custom pages can someone explain WHY we can't use the current user info to display certain targetted info. It means that I have to build two separate pages and try and find new ways of linking them which is twice the work! Also it's rather misleading to see them there if you can only use them on static pages!
|
|
#eb7100
1480
0
Member is Online
1
Apr 25, 2024 2:35:17 GMT -8
Craig
208,868
September 2001
cmdynasty
|
Post by Craig on May 19, 2017 0:41:02 GMT -8
The custom pages and the templates serve two different purposes. Whilst i can appreciate what you are trying to do, the templates and custom page systems were not designed with that in mind. I am not sure if they will be changing that in the future, but it is not something [ a question ] which is raised here very often. But i will mark this as a feature request.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 19, 2017 0:44:53 GMT -8
The custom pages and the templates serve two different purposes. Whilst i can appreciate what you are trying to do, the templates and custom page systems were not designed with that in mind. I am not sure if they will be changing that in the future, but it is not something [ a question ] which is raised here very often. But i will mark this as a feature request. I'd not mind so much if it wasn't an actual option on the custom page layout. This is what is causing more fustration. See attached screenshot: That's what I find more fustrating. It's there but I apparently can't use it!
|
|
#eb7100
1480
0
Member is Online
1
Apr 25, 2024 2:35:17 GMT -8
Craig
208,868
September 2001
cmdynasty
|
Post by Craig on May 19, 2017 0:53:21 GMT -8
The custom pages and the templates serve two different purposes. Whilst i can appreciate what you are trying to do, the templates and custom page systems were not designed with that in mind. I am not sure if they will be changing that in the future, but it is not something [ a question ] which is raised here very often. But i will mark this as a feature request. I'd not mind so much if it wasn't an actual option on the custom page layout. This is what is causing more fustration. See attached screenshot: That's what I find more fustrating. It's there but I apparently can't use it! The template system is not used on the custom pages. It isn't there at all, so it is not a matter of you being locked out of using it. Since the custom pages can have zones, and those zones have dynamic, changing content, the $[zone_1] is simply a marker, or placeholder, to say place the respective zone there. It is not the same as the variable $[user], for example, which can be different depending on what content is loading, or who is viewing the page. In other words, it the $[ ... ] is used in both instances, but that is just for practical reasons.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 19, 2017 0:57:56 GMT -8
I'd not mind so much if it wasn't an actual option on the custom page layout. This is what is causing more fustration. See attached screenshot: That's what I find more fustrating. It's there but I apparently can't use it! The template system is not used on the custom pages. It isn't there at all, so it is not a matter of you being locked out of using it. Since the custom pages can have zones, and those zones have dynamic, changing content, the $[zone_1] is simply a marker, or placeholder, to say place the respective zone there. It is not the same as the variable $[user], for example, which can be different depending on what content is loading, or who is viewing the page. That much I get - however given that if you look in the side column of the attached screenshot there IS the options the same as you'd use in a layout template for is_member is_guest is_banned - that would lead me (and I believe other users) that they can be used to indicate certain zones to only display to certain types of user
|
|
#eb7100
1480
0
Member is Online
1
Apr 25, 2024 2:35:17 GMT -8
Craig
208,868
September 2001
cmdynasty
|
Post by Craig on May 19, 2017 1:12:46 GMT -8
The template system is not used on the custom pages. It isn't there at all, so it is not a matter of you being locked out of using it. Since the custom pages can have zones, and those zones have dynamic, changing content, the $[zone_1] is simply a marker, or placeholder, to say place the respective zone there. It is not the same as the variable $[user], for example, which can be different depending on what content is loading, or who is viewing the page. That much I get - however given that if you look in the side column of the attached screenshot there IS the options the same as you'd use in a layout template for is_member is_guest is_banned - that would lead me (and I believe other users) that they can be used to indicate certain zones to only display to certain types of user Oh, my apologies, i see what you mean now. It's a little faded over there so didn't notice it on the screenshot. I have never seen those options there before, so not sure when they were added, or if i just completely missed them before. I only recall seeing the zones listed there. It looks like that just contains the route and the current user options, for display purposes , and it doesn't have the functionality for the if/for statement though. I can understand the frustration. As i said, in the past i have known that they use different systems. Since it looks like things have changed in there, i can't give you a solid answer now, so will step out and leave it for a red to reply. I will leave this as a feature request for the if/for statements.
|
|
#e61919
Support Staff
224482
0
1
Apr 24, 2024 16:47:46 GMT -8
Scott
23,285
August 2015
socalso
|
Post by Scott on May 19, 2017 7:31:22 GMT -8
Boy_Wonder, I'll check with a dev on this when one arrives.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 19, 2017 7:34:50 GMT -8
Boy_Wonder, I'll check with a dev on this when one arrives. Thank you!
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 20, 2017 12:05:54 GMT -8
Scott - did you get chance to ask a dev?
|
|
#e61919
Support Staff
224482
0
1
Apr 24, 2024 16:47:46 GMT -8
Scott
23,285
August 2015
socalso
|
Post by Scott on May 20, 2017 12:18:23 GMT -8
Boy_Wonder, I'll check with a dev on this when one arrives. Thank you! Apologies Boy_Wonder, they were in v6 meetings all day. My bad, should have posted back yesterday.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 20, 2017 12:26:40 GMT -8
Apologies Boy_Wonder , they were in v6 meetings all day. My bad, should have posted back yesterday. It's cool - I'll check back again tuesday as I assume they won't be in now till monday
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on May 20, 2017 12:28:28 GMT -8
Hey Boy_Wonder . I'm not sure of the thinking that went into disabling if/for statements for zones, but you can still use those variables for your use case, however. I think what Craig said might be right (the zone variable acting as a placeholder). You could go directly to the HTML tab and use you custom HTML with those if statements. {if $[current_user.is_guest]} Guest HTML here {else} Logged in HTML here {/if} I agree that it is a bit misleading to have the zone variables in the same place as the HTML for the page, however. Another thing, did you want to use the widgets in a zone or pure HTML/JS/CSS?
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 20, 2017 12:31:50 GMT -8
Hey Boy_Wonder . I'm not sure of the thinking that went into disabling if/for statements for zones, but you can still use those variables for your use case, however. I think what Craig said might be right (the zone variable acting as a placeholder). You could go directly to the HTML tab and use you custom HTML with those if statements. {if $[current_user.is_guest]} Guest HTML here {else} Logged in HTML here {/if} I agree that it is a bit misleading to have the zone variables in the same place as the HTML for the page, however. Another thing, did you want to use the widgets in a zone or pure HTML/JS/CSS? Unfortunately I do need to use the widgets so that things automatically get updated
|
|
inherit
226544
0
Oct 5, 2018 10:29:39 GMT -8
Ulises
4,881
November 2015
umacklin
Ulises Weirdo
|
Post by Ulises on May 20, 2017 12:33:50 GMT -8
Boy_Wonder Ah, that's what I figured was most likely the case. We'll leave a note with the devs to see why this isn't the case and if its possible to be changed.
|
|
inherit
Peabrained Codebreaker
107114
0
Mar 11, 2020 7:47:27 GMT -8
Boy_Wonder
6,249
July 2007
natzy24
|
Post by Boy_Wonder on May 23, 2017 11:59:53 GMT -8
Just checking in
|
|