I’m sure this has been done before, but I can’t figure it out. I’m working on a news site, and it’s going to have several columnists, each with their own blog and categories, but using the same field group.
So, I want to use one SAEF form, and dynamically set the weblog for that form based on the logged in user. I tried assigning variables like below, but it’s not working:
{if member_id == '4'}{assign_variable:column_name="columnist_name1"}{/if}
{if member_id == '5'}{assign_variable:column_name="columnist_name2"}{/if}This variable would be used as segment_3 in a link to the SAEF from the columnist’s profile page like so (group 6 is columnists):
<a href="/index.php/columnists/new_article/{column_name}">Write a new entry for your column</a>And the form would use {column_name} as the weblog for that user.
The conditionals aren’t working and I found on the forums that this is a parsing issue; no matter who is logged in, it will also set the variable to be for the first member_id in the list of conditionals.
Is there a better way to approach this?
Thanks for any help!
Ken