Hi!
On the website I'm working on, I have a blog and a profile directory.
I need to link the blog and profile template, so that it detects if the "author_name" in the blog template matches a name in the profile template, it links the "author_name" to his profile, and also I need to show the profile picture of the author, also coming from the profile template.
What I tried is :
So I'm setting the variable outside of the masterpage="profile.php" scope.
author_prenom and author_nom are the 2 fields from the blog template that I have to enter in the admin section, to tell who wrote the article.
Then, I tried to tell couchcms to verify :
if author_name (from blog) matches "profile_prenom + profile_nom" (from profile), then it shows adds the link to his profile, and his profile photo.
How should I do this? Thanks!
On the website I'm working on, I have a blog and a profile directory.
I need to link the blog and profile template, so that it detects if the "author_name" in the blog template matches a name in the profile template, it links the "author_name" to his profile, and also I need to show the profile picture of the author, also coming from the profile template.
What I tried is :
- Code: Select all
<cms:set author_name="<cms:show author_prenom/> <cms:show author_nom />"/>
<cms:pages masterpage='profile.php'>
<cms:set get_name="<cms:show profile_prenom/> <cms:show author_nom />" />
<cms:if author_name == "<cms:show get_name/>" >
<h3> Author name : <a href="<cms:show k_page_link />">click</a></h3>
<cms:show profile_photo />
<cms:else />
<h3> Not working </h3>
</cms:if>
<cms:show author_name/>
</cms:pages>
So I'm setting the variable outside of the masterpage="profile.php" scope.
author_prenom and author_nom are the 2 fields from the blog template that I have to enter in the admin section, to tell who wrote the article.
Then, I tried to tell couchcms to verify :
if author_name (from blog) matches "profile_prenom + profile_nom" (from profile), then it shows adds the link to his profile, and his profile photo.
How should I do this? Thanks!