I'm not sure if I understood completely but I moved the steps to the top of my code. I deleted the cookie and have also bene logging in and out and using different browsers - but still no joy.
It will only show me the 'Application Form' template/region
Debug Message - Perch 3.0.1
[1] SELECT * FROM perch2_members_sessions WHERE sessionID='c92b1f23e9dc571b83135bd97acf16e6ba05b8ce' AND sessionHttpFootprint='d14cd54ac70be985706a5b10946fd141a936e5de' AND sessionExpires>'2017-04-10 18:51:02' LIMIT 1
User is logged in
[1] SELECT * FROM perch2_pages WHERE pagePath='/learning-community/application.php' LIMIT 1
[19] SELECT regionKey, regionHTML FROM perch2_content_regions WHERE regionPage='/learning-community/application.php' OR regionPage='*' ORDER BY regionPage DESC
Using template: /templates/pages/attributes/default.html
Using sub-template: /templates/pages/attributes/seo.html
[11] SELECT * FROM perch2_pages WHERE pageNew=0 AND pageHidden=0 ORDER BY pageTreePosition ASC
[1] SELECT pageTreePosition FROM perch2_pages WHERE pagePath='/learning-community/application.php' LIMIT 1
[2] SELECT pageID FROM perch2_pages WHERE pageTreePosition IN ('000-009-001', '000-009', '000') ORDER BY pageTreePosition DESC
[5] Using template: /templates/navigation/item.html
NO TAG: 0
NO TAG: 1
NO TAG: 2
NO TAG: 3
NO TAG: 4
NO TAG: 5
No matter what tag I'm applying to a member account. It will only ever show me the content for 'Application Form'.
I want it to for example: If a member has the tag 'application-received' to see the content for 'Application Received' and that content only. I want the Application Form to be hidden unless the member has no tags.
Oh I know that Drew - I really appreciate your help. I'm sorry if I came across rude there at all - That wasn't my intention
Yes I have created all of the regions in Perch Admin and assigned content and I am applying the tags on the individual member profile page - also in Perch Admin - see here
foreach($steps as $tag => $region) {
$chosen_region = 'Application Form';
if (perch_member_has_tag($tag)) $chosen_region = $region;
}
perch_content($chosen_region);
and it's not picking up any tags as the debug shows:
NO TAG: 0
NO TAG: 1
NO TAG: 2
NO TAG: 3
NO TAG: 4
NO TAG: 5
If I manually change the chosen_region to one of the steps then the page displays what it should be showing for that region - so I know that's working.
There must be a problem with my foreach statement - Could you please check it to see if you can see where I'm going wrong?
Tags are just being assigned manually at various times.. Nothing on the site/system adds the tags for my user.
What I'm trying to achieve is an application form journey. For example:
User fills out application form on application.php
Once my client has seen the submitted form entry they will add the Tag 'application-received' to the members account in Perch Admin. This would then hide the application form from application.php and instead display a message saying that the application has been received along with some other stuff
Once they have reviewed the application they will go back to that members account and add either 'application-accepted' 'application-rejected' etc and I want to show the content that is relevant to each of these tags.
I'm not sure if I understood completely but I moved the steps to the top of my code. I deleted the cookie and have also bene logging in and out and using different browsers - but still no joy.
It will only show me the 'Application Form' template/region
replace this
with this
Check your Debug and whats going on?
Hmmm
I'm getting
Parse error: syntax error, unexpected end of file in /var/sites/d/dev.amso.online/public_html/learning-community/application.php on line 68
But I cant see anything wrong with the code - I don't even have a line 68
That sounds like a bracket or brace set left open.
Sorry my bad. Was a missing }
Ok so now i'm getting the following in my debug:
Any ideas from looking at my debug output where I'm going wrong?
What's not working?
My steps with Member Tags.
No matter what tag I'm applying to a member account. It will only ever show me the content for 'Application Form'.
I want it to for example: If a member has the tag 'application-received' to see the content for 'Application Received' and that content only. I want the Application Form to be hidden unless the member has no tags.
Are you sure your logic is correct and this is a Perch issue?
I think it's a Perch issue as I'm using the code that you recommended along with some content areas that are being created:
Here's the content areas
and here's the code that you recommended
I was simply trying to help with your question - this isn't the software you've paid for, it's just me trying to be helpful.
Have the regions been created?
Where are you applying the tags?
Oh I know that Drew - I really appreciate your help. I'm sorry if I came across rude there at all - That wasn't my intention
Yes I have created all of the regions in Perch Admin and assigned content and I am applying the tags on the individual member profile page - also in Perch Admin - see here
I'm assuming the problem lies here:
and it's not picking up any tags as the debug shows:
If I manually change the chosen_region to one of the steps then the page displays what it should be showing for that region - so I know that's working.
There must be a problem with my foreach statement - Could you please check it to see if you can see where I'm going wrong?
When are you assigning the tags?
Hi Drew,
Tags are just being assigned manually at various times.. Nothing on the site/system adds the tags for my user.
What I'm trying to achieve is an application form journey. For example:
User fills out application form on application.php
Once my client has seen the submitted form entry they will add the Tag 'application-received' to the members account in Perch Admin. This would then hide the application form from application.php and instead display a message saying that the application has been received along with some other stuff
Once they have reviewed the application they will go back to that members account and add either 'application-accepted' 'application-rejected' etc and I want to show the content that is relevant to each of these tags.
This is wrong - you keep setting the region back on every iteration:
should be:
Thanks Drew - that worked.
Massively appreciate your help on this