Forum
Members Dynamic Content
Sorry for all questions in advanced.
So I am trying to dynamically fill a members page with a blog tag and header image.
I know members each have their own tags but how do I show blogs with that tag on only their member page?
And how do I get a different image to show as header based on their tag?
I have tried this with out much luck
I was hoping it worked like
Hello beckhusen
You have a syntax error in your code.
'tag' => perch_member_get('first_name');
should not end with a semicolon;
, but a comma,
.The above code would retrieve blog posts tagged with the member's first name. Is this what you're trying to achieve?
You'd need to check whether the member has the tag with
perch_member_has_tag()
. For example:Documentation for the Members app functions: https://docs.grabaperch.com/functions/members/
oh perfect! I got the tagging blog situation to work.
is there a way to make the 'subscriber' dynamic?
It depends. What do you want to test against? Do you have a list of tags somewhere?
well i want each member to have their own, so there will be a list of client tags to select from
I don't know enough about your project to suggest the best way to implement this.
From the code above it seems you have blog posts tagged with members first names. The members themselves don't have tags as far as I can tell, is this right?
So perhaps you want to check whether the member is logged in?
They do currently have tags, and it is their first name
Each member will be clients and the introductory header will have an image specific to their business ie:
Name: Betty Tag: Betty Photo: /login/resources/bettysheader.jpg
Name: David Tag: David Photo: /login/resources/davidssheader.jpg
Name: Lacy Tag: Lacy Photo: /login/resources/lacysheader.jpg
Also, how do I add more fields to the Members detail admin area? ie: title, phone number, logo picture/
You don't need to add a tag to a member with their first name. You can get their first name with
perch_member_get('first_name')
.Though for what you're trying to achieve you may not even need their name. Add a field to the member edit form for the header and add regions for default headers:
You can do so from
perch/templates/members/member.html
. This where you'd add the field for the member's header for example.As far as I'm aware you can't upload images/files to the member's profile. So the header in the above solution will have to be a text field containing the path to the image.
You are so much help!
I have added the image field to upload the header but it won't stay and I get this as the output <!-- Undefined content: Members Header -->
So you'd have to add a text field and add the path there for e.g.
/login/resources/lacysheader.jpg
This is because you have not defined the content for the region
perch_content('Members Header')
. Go to the page in the control panel and you should see a new editable region.This will most likely work for what I need, but I can not for the life of me get the code wrapped right. How do I incorporate your code into mine? The only thing that changes is between data-image-src=" "
You can do something like this:
And the template you use for the regions
Members Header
andNon-Members Header
can include the.parallax-window
markup in there: