<?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 Re: Data from a custom field to module in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/573504#M27320</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510"&gt;@webdew&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92197"&gt;@albertsg&lt;/a&gt;&amp;nbsp;Thanks for the input. I have figured out the Hubl needed to bring in a custom field. I went into the developers info of the page where the logo is uploaded via a custom field to see the json and arrived at a solution. Here is my solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{{our_work_content.widgets.portfolio_logo_upload.body.src}}&lt;/P&gt;</description>
    <pubDate>Thu, 10 Feb 2022 12:52:35 GMT</pubDate>
    <dc:creator>LSeth</dc:creator>
    <dc:date>2022-02-10T12:52:35Z</dc:date>
    <item>
      <title>Data from a custom field to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/572084#M27271</link>
      <description>&lt;P&gt;I am setting up a module using the page custom field. On a page template I have a custom image field. When the module selects a page I want to bring the custom field from that page and display it when the module is used. In the code below its the data in the &amp;lt;img&amp;gt; tag that is not working. The image custom field is named portfolio_logo_upload. What am I missing? Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{% set our_work_content = content_by_id(module.page_selection) %}&lt;BR /&gt;&amp;lt;div class="portfolio-selection-single" style="background-image: url({{our_work_content.featured_image}})"&amp;gt;&lt;BR /&gt;&amp;lt;a href="{{ our_work_content.absolute_url }}"&amp;gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;img src="{{widget_data.portfolio_logo_upload.img.src}}"&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Feb 2022 22:21:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/572084#M27271</guid>
      <dc:creator>LSeth</dc:creator>
      <dc:date>2022-02-08T22:21:29Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a custom field to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/572454#M27286</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/204643"&gt;@LSeth&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I think you are using "Copy value only" instead of "Copy snippet"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Please try click on "Copy snippet" and replace with your code "&amp;lt;img src="{{widget_data.portfolio_logo_upload.img.src}}"&amp;gt;"&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps!&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and Regards.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 11:16:30 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/572454#M27286</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2022-02-09T11:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a custom field to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/572539#M27288</link>
      <description>&lt;P&gt;Thanks for the response but I am not using a module for the image on the page template. I don't have the option of copy value or snippet. I am using the following hubl in the page template:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{% image "portfolio_logo_upload" label="Upload a Logo" export_to_template_context=true %}&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 12:56:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/572539#M27288</guid>
      <dc:creator>LSeth</dc:creator>
      <dc:date>2022-02-09T12:56:20Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a custom field to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/573067#M27297</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/204643"&gt;@LSeth&lt;/a&gt;,&amp;nbsp;if I don't get it wrong you want to use the image from the image module in a page which has been selected in a page module, right?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've recently done something similar and the key to find the solution is understanding what the page module returns.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have only 1 page, it will return a string with the ID of the page. With this string you can use the function &lt;A href="https://developers.hubspot.com/docs/cms/hubl/functions#content-by-id" target="_blank" rel="noopener"&gt;content_by_id&lt;/A&gt; to return the page/blog object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you have the object, you just need to access the module's value. Here's an example that works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{# First, get the content using the ID returned by the module #}
{% set my_content = content_by_id(module.page_field) %}
{# Then access the page module's information, in this case the src attibute of the image module #}
{{my_content.widgets.module_164444398815712.body.image_field.src}}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just replace module_164444398815712 by the name of your image module.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if you have any questions&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Feb 2022 22:21:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/573067#M27297</guid>
      <dc:creator>albertsg</dc:creator>
      <dc:date>2022-02-09T22:21:44Z</dc:date>
    </item>
    <item>
      <title>Re: Data from a custom field to module</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/573504#M27320</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510"&gt;@webdew&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/92197"&gt;@albertsg&lt;/a&gt;&amp;nbsp;Thanks for the input. I have figured out the Hubl needed to bring in a custom field. I went into the developers info of the page where the logo is uploaded via a custom field to see the json and arrived at a solution. Here is my solution:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;{{our_work_content.widgets.portfolio_logo_upload.body.src}}&lt;/P&gt;</description>
      <pubDate>Thu, 10 Feb 2022 12:52:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Data-from-a-custom-field-to-module/m-p/573504#M27320</guid>
      <dc:creator>LSeth</dc:creator>
      <dc:date>2022-02-10T12:52:35Z</dc:date>
    </item>
  </channel>
</rss>

