<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to create a Multi Author Module in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/How-to-create-a-Multi-Author-Module/m-p/784027#M33869</link>
    <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a module allowing editors to put more than one author in a blog post. Hubspot only allows one author, which could be better. I found this code online:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;			{% set auth_selector = [] %}
			{% set my_authors = blog_authors('default', 250) %}
			 {% for item in my_authors %}
           {% do auth_selector.append( [item, item.full_name] ) %}
              {% endfor %}
			  //second author//
			  {% choice "second_auth_selector" label="Second Author",  choices={{auth_selector}}, export_to_template_context=True %}
       {% set second = content.widgets.second_auth_selector.body.value %}
	  {% if second.name  %}
	    &amp;lt;div id="second_author" class="author"&amp;gt;
		 {% if second.avatar %}
          &amp;lt;div class="author-image" style="background-image:url({{ second.avatar }});"&amp;gt;&amp;lt;/div&amp;gt;
	 	    {% else %}
   &amp;lt;div class="image-placeholder"&amp;gt;&amp;lt;/div&amp;gt;
      {% endif %}
        &amp;lt;div class="author-details"&amp;gt;
	  &amp;lt;div class="author-name"&amp;gt;{{ second.name }}&amp;lt;/div&amp;gt;
	  &amp;lt;div class="author-bio"&amp;gt;
          {% if  second.bio is containing auth_needle %}
      {{ second.bio|regex_replace("@.*$", "")|regex_replace("_", " ") }} @ {{ second.bio|regex_replace("^[^@]*@", " ")|regex_replace("_", " ") }}
      {% else %}
      {{ second.bio }}
      {% endif %}
          &amp;lt;/div&amp;gt;
	  &amp;lt;div class="date-created"&amp;gt;{{ content.publish_date|datetimeformat('%e %b %Y') }} &amp;lt;/div&amp;gt;
		  &amp;lt;/div&amp;gt;
		  &amp;lt;/div&amp;gt;
		  {% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created two choice fields, one labeled Author and the other labeled Second Author. I am trying to get all my authors and append/show them in the dropdown list. The code above works to append but I need help getting it to show in the dropdown of the choice field in the frontend. Could anyone please give me a step-by-step on how to get this done? I want to show all the author choices in two choice fields (Author and Second Author). Once the user clicks on an author it will show on the author avatar image, name and bio on the blog post. Thank you in advance! I'm stuck on this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 19 Apr 2023 17:27:11 GMT</pubDate>
    <dc:creator>vorellana814</dc:creator>
    <dc:date>2023-04-19T17:27:11Z</dc:date>
    <item>
      <title>How to create a Multi Author Module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-create-a-Multi-Author-Module/m-p/784027#M33869</link>
      <description>&lt;P&gt;Hi guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a module allowing editors to put more than one author in a blog post. Hubspot only allows one author, which could be better. I found this code online:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;			{% set auth_selector = [] %}
			{% set my_authors = blog_authors('default', 250) %}
			 {% for item in my_authors %}
           {% do auth_selector.append( [item, item.full_name] ) %}
              {% endfor %}
			  //second author//
			  {% choice "second_auth_selector" label="Second Author",  choices={{auth_selector}}, export_to_template_context=True %}
       {% set second = content.widgets.second_auth_selector.body.value %}
	  {% if second.name  %}
	    &amp;lt;div id="second_author" class="author"&amp;gt;
		 {% if second.avatar %}
          &amp;lt;div class="author-image" style="background-image:url({{ second.avatar }});"&amp;gt;&amp;lt;/div&amp;gt;
	 	    {% else %}
   &amp;lt;div class="image-placeholder"&amp;gt;&amp;lt;/div&amp;gt;
      {% endif %}
        &amp;lt;div class="author-details"&amp;gt;
	  &amp;lt;div class="author-name"&amp;gt;{{ second.name }}&amp;lt;/div&amp;gt;
	  &amp;lt;div class="author-bio"&amp;gt;
          {% if  second.bio is containing auth_needle %}
      {{ second.bio|regex_replace("@.*$", "")|regex_replace("_", " ") }} @ {{ second.bio|regex_replace("^[^@]*@", " ")|regex_replace("_", " ") }}
      {% else %}
      {{ second.bio }}
      {% endif %}
          &amp;lt;/div&amp;gt;
	  &amp;lt;div class="date-created"&amp;gt;{{ content.publish_date|datetimeformat('%e %b %Y') }} &amp;lt;/div&amp;gt;
		  &amp;lt;/div&amp;gt;
		  &amp;lt;/div&amp;gt;
		  {% endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I created two choice fields, one labeled Author and the other labeled Second Author. I am trying to get all my authors and append/show them in the dropdown list. The code above works to append but I need help getting it to show in the dropdown of the choice field in the frontend. Could anyone please give me a step-by-step on how to get this done? I want to show all the author choices in two choice fields (Author and Second Author). Once the user clicks on an author it will show on the author avatar image, name and bio on the blog post. Thank you in advance! I'm stuck on this!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2023 17:27:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-create-a-Multi-Author-Module/m-p/784027#M33869</guid>
      <dc:creator>vorellana814</dc:creator>
      <dc:date>2023-04-19T17:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Multi Author Module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/How-to-create-a-Multi-Author-Module/m-p/784616#M33882</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/538025"&gt;@vorellana814&lt;/a&gt;. Thanks for reaching out. One question to get us started — Is this the post you used for your code?&amp;nbsp;&lt;A href="https://community.hubspot.com/t5/CMS-Development/Multiple-authors-for-blog/m-p/701150#M30700" target="_blank" rel="noopener"&gt;Multiple authors for blog&lt;/A&gt; from&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/146956"&gt;@BarryGrennan&lt;/a&gt;? If not, can you link to the post you are referring to, please?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks! Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2023 19:55:06 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/How-to-create-a-Multi-Author-Module/m-p/784616#M33882</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-04-20T19:55:06Z</dc:date>
    </item>
  </channel>
</rss>

