<?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 Is there a URL Prefix variable in Simple XML? in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155485#M9502</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to link to a python controller from a simple xml html panel. I want to get the URL prefix, &lt;A href="http://localhost:8000/" target="_blank"&gt;http://localhost:8000/&lt;/A&gt;, dynamically and not have to hard code it. In simple xml, is there a variable for the URL prefix (similar to {{SPLUNKWEB_URL_PREFIX}} in javascript)?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;form&amp;gt;
    ....
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
     &amp;lt;html&amp;gt; &amp;lt;a href="http://localhost:8000/en-US/custom/test_app/testcontroller"&amp;gt;Link to controller&amp;lt;/a&amp;gt;   &amp;lt;/html&amp;gt;
    ...
  &amp;lt;/panel&amp;gt;  
  &amp;lt;/row&amp;gt;
    &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 28 Sep 2020 19:01:52 GMT</pubDate>
    <dc:creator>jamesvz84</dc:creator>
    <dc:date>2020-09-28T19:01:52Z</dc:date>
    <item>
      <title>Is there a URL Prefix variable in Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155485#M9502</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am trying to link to a python controller from a simple xml html panel. I want to get the URL prefix, &lt;A href="http://localhost:8000/" target="_blank"&gt;http://localhost:8000/&lt;/A&gt;, dynamically and not have to hard code it. In simple xml, is there a variable for the URL prefix (similar to {{SPLUNKWEB_URL_PREFIX}} in javascript)?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;form&amp;gt;
    ....
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
     &amp;lt;html&amp;gt; &amp;lt;a href="http://localhost:8000/en-US/custom/test_app/testcontroller"&amp;gt;Link to controller&amp;lt;/a&amp;gt;   &amp;lt;/html&amp;gt;
    ...
  &amp;lt;/panel&amp;gt;  
  &amp;lt;/row&amp;gt;
    &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 19:01:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155485#M9502</guid>
      <dc:creator>jamesvz84</dc:creator>
      <dc:date>2020-09-28T19:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a URL Prefix variable in Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155486#M9503</link>
      <description>&lt;P&gt;I would recommend switching to a relative path. That way, the view will work even if the server IP or port changes, if it uses a different language, or a custom root endpoint.&lt;/P&gt;

&lt;P&gt;Below is a modified version that should work for you:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;    &amp;lt;form&amp;gt;
  ...
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
     &amp;lt;html&amp;gt; &amp;lt;a href="/custom/test_app/testcontroller"&amp;gt;Link to controller&amp;lt;/a&amp;gt;   &amp;lt;/html&amp;gt;
 ...
  &amp;lt;/panel&amp;gt;  
  &amp;lt;/row&amp;gt;
    &amp;lt;/form&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Feb 2015 05:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155486#M9503</guid>
      <dc:creator>LukeMurphey</dc:creator>
      <dc:date>2015-02-20T05:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Is there a URL Prefix variable in Simple XML?</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155487#M9504</link>
      <description>&lt;P&gt;I totally agree, in this day and age, no link should be hard coded, all should use a relative path.  Browsers are now intelligent enough to detect that all you want to do is use the same root URL but with a different path on the end.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Feb 2015 12:35:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/Is-there-a-URL-Prefix-variable-in-Simple-XML/m-p/155487#M9504</guid>
      <dc:creator>markthompson</dc:creator>
      <dc:date>2015-02-20T12:35:22Z</dc:date>
    </item>
  </channel>
</rss>

