<?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: Redirect in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1006822#M42073</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/790499"&gt;@znajem&lt;/a&gt;,&amp;nbsp;do you mean inside the page-editor?&amp;nbsp;&lt;BR /&gt;If so - yes it's normal because you're trying to open a non HubSpot page inside HubSpot which is not possible.&lt;/P&gt;
&lt;P&gt;Also you might want to put the redirect script to the external page if you're redirecting from HubSpot to somewhere else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
    <pubDate>Thu, 11 Jul 2024 09:42:29 GMT</pubDate>
    <dc:creator>Anton</dc:creator>
    <dc:date>2024-07-11T09:42:29Z</dc:date>
    <item>
      <title>Redirect</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1003344#M42070</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hope this email finds you well.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;We need to automatically redirect a page to a new link after 10 seconds. I attempted to add the code to the head section in the settings of the landing page, but not working.&lt;BR /&gt;"&lt;SPAN&gt;Redirect Error&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;It looks like some code on your page caused a redirect to an unexpected URL, preventing the editor from working properly. Please wrap any javascript redirect code on your page with editor check conditionals. See the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://developers.hubspot.com/docs/cms/guides/provide-a-good-editor-experience#how-to-use-window-hsineditor-" target="_blank" rel="nofollow noopener noreferrer"&gt;knowledge base&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;for more information."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 10:41:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1003344#M42070</guid>
      <dc:creator>znajem</dc:creator>
      <dc:date>2024-07-10T10:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: Redirect</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1003412#M42071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/790499"&gt;@znajem&lt;/a&gt;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if you're putting the script into the head section in the settings the script will be executed inside the page builder which will lead to the error you'll see.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can wrap it in a simple if/unless statement like this&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% unless is_in_page_editor %}
&amp;lt;script&amp;gt;
document.addEventListener("DOMContentLoaded", function() {
   setTimeout(function() {
      window.location.href = "https://www.example.com";
   }, 
   10000); // 10000 milliseconds = 10 seconds
});
&amp;lt;/script&amp;gt;
{% endunless %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;change the window.location.href to the url you'd like to redirect to and modify the delay if needed.&lt;/P&gt;
&lt;P&gt;The {% unless is_in_page_editor %} statement will execute the script if you're not in the page builder.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can find &lt;A href="https://developers.hubspot.com/docs/cms/hubl/variables#in-app-editor-and-preview-variables" target="_blank" rel="noopener"&gt;more about this variable&lt;/A&gt; here in the docs&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 12:27:37 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1003412#M42071</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2024-07-10T12:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: Redirect</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1003418#M42072</link>
      <description>&lt;P&gt;Hello Anton,&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;The redirect works properly when using the URL (&lt;A href="https://info.esa.edu.lb/thank-you-page" target="_new" rel="noreferrer"&gt;https://info.esa.edu.lb/thank-you-page&lt;/A&gt;), but in HubSpot, I always receive an error message stating that the page has been blocked by Chrome. Is this normal?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 12:33:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1003418#M42072</guid>
      <dc:creator>znajem</dc:creator>
      <dc:date>2024-07-10T12:33:46Z</dc:date>
    </item>
    <item>
      <title>Re: Redirect</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1006822#M42073</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/790499"&gt;@znajem&lt;/a&gt;,&amp;nbsp;do you mean inside the page-editor?&amp;nbsp;&lt;BR /&gt;If so - yes it's normal because you're trying to open a non HubSpot page inside HubSpot which is not possible.&lt;/P&gt;
&lt;P&gt;Also you might want to put the redirect script to the external page if you're redirecting from HubSpot to somewhere else&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anton&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 09:42:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Redirect/m-p/1006822#M42073</guid>
      <dc:creator>Anton</dc:creator>
      <dc:date>2024-07-11T09:42:29Z</dc:date>
    </item>
  </channel>
</rss>

