<?xml version="1.0" encoding="UTF-8"?>    <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
      <channel>
        <title>Display/hide link</title>
        <link>https://interactivetools.com/forum/forum-posts.php?Display-hide-link-70203</link>
        <description></description>
        <pubDate>Mon, 13 Apr 2026 11:11:39 -0700</pubDate>
        <language>en-us</language>
        <atom:link href="https://interactivetools.com/forum/forum-posts.php?rss=1&amp;Display-hide-link-70203" rel="self" type="application/rss+xml" />

                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198337#post2198337</link>
          <description><![CDATA[Not a problem. For SEO purposes you should probably use a htaccess 301 redirect rather than a META redirect. Here is a tutorial in case you're not familiar with this. <br /><br /><a target="_blank" href="http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm">http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm</a><br />]]></description>
          <pubDate>Wed, 22 Jul 2009 10:25:10 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198337#post2198337</guid>
        </item>
                <item>
          <title>Re: [jdancisin] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198336#post2198336</link>
          <description><![CDATA[Hi.<br /><br />Thanks for helping out on this one :). I really appreciate and I know Farnham does too.<br />]]></description>
          <pubDate>Wed, 22 Jul 2009 10:17:00 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198336#post2198336</guid>
        </item>
                <item>
          <title>Re: [jdancisin] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198333#post2198333</link>
          <description><![CDATA[Great! That works! Thanks a million, jdancisin. And it does need the .php extension as you thought. The only downside here is that anyone who has the website bookmarked will get a &quot;Not Found&quot; message. We'll have to redirect them to the new URL. But it does what the client asked for. That's what matters.<br /><br />Thanks again for your help, <br /><br />Farnham<br />]]></description>
          <pubDate>Wed, 22 Jul 2009 10:09:14 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198333#post2198333</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198332#post2198332</link>
          <description><![CDATA[One more suggestion...<br /><br />The default_cms file doesn't include the database connection code at the top of the page. It definitely won't work without this. Try inserting this at the very top of your code:<br /><br /><code>&lt;?php header('Content-type: text/html; charset=utf-8'); ?&gt;<br />&lt;?php<br />  <br />  require_once &quot;/home/content/n/o/b/noblehorizons/html/cmsAdmin/lib/viewer_functions.php&quot;;<br /><br />  list($link_creatorRecords, $link_creatorMetaData) = getRecords(array(<br />    'tableName'   =&gt; 'link_creator',<br />    'where'       =&gt; whereRecordNumberInUrl(1),<br />    'limit'       =&gt; '1',<br />  ));<br />  $link_creatorRecord = @$link_creatorRecords[0]; // get first record<br /><br />  // show error message if no matching record is found<br />  if (!$link_creatorRecord) {<br />    print &quot;Record not found!&quot;;<br />    exit;<br />  }<br /><br />?&gt;</code><br /><br />And you may also need to change the extension to .php<br />]]></description>
          <pubDate>Wed, 22 Jul 2009 08:26:09 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198332#post2198332</guid>
        </item>
                <item>
          <title>Re: [jdancisin] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198331#post2198331</link>
          <description><![CDATA[I tried that, jdancisin, but still no luck.  Thanks for your suggestion.<br />]]></description>
          <pubDate>Wed, 22 Jul 2009 08:07:31 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198331#post2198331</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198323#post2198323</link>
          <description><![CDATA[I think the problem is because your file is .htm rather than .php <br />Its likely that its not executing the php commands. Try switching the extension to .php and see if it works.<br />]]></description>
          <pubDate>Tue, 21 Jul 2009 19:30:45 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198323#post2198323</guid>
        </item>
                <item>
          <title>Re: [ross] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198321#post2198321</link>
          <description><![CDATA[Hi Ross,<br /><br />Thanks for the response.  My guess is that either isdoo's or sagentic's script will work and that I'm doing something wrong.  My emergency_linkDetail.php file works fine and either has a word on the page or nothing on the page when I enter or delete in the CMSB Link Creator section.  But it posts the link on the website home page (copy attached) whether the page has a word or not, and then the link won't go away if I empty the emergency_linkDetail.php page. Do I have a path wrong somewhere or what?  I'm sure it will do what I want once you take a look at it. Btw, the ticket ID is SJI-489756.<br /><br />Best regards,  Farnham<br />]]></description>
          <pubDate>Tue, 21 Jul 2009 15:31:00 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198321#post2198321</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198316#post2198316</link>
          <description><![CDATA[Hi Farnham<br /><br />I agree with sagentic. Let's get you switched over to a fully PHP solution so that we can eliminate the JavaScript as a possible problem.<br /><br />Can you give that a shot? And then perhaps post a copy of your whole template (as an attachment, please :)) so we can take a closer look at how it's all put together.<br /><br />Thanks!<br />]]></description>
          <pubDate>Tue, 21 Jul 2009 11:40:26 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198316#post2198316</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198310#post2198310</link>
          <description><![CDATA[Forget the javascript all together<br /><br />Just write a regular if statement that is triggered when the text field contains content<br /><br />REGULAR IF STATEMENT<br /><br />&lt;?php if ($link_creatorRecord['emergency_link']): ?&gt; <br />***Insert other code here*** <br />&lt;?php endif ?&gt;<br /><br />or optionally you can write an if statement that is triggered when the field is blank<br /><br />REGULAR IF DOES NOT EXIST STATEMENT<br /><br />&lt;?php if (!$link_creatorRecord['emergency_link']): ?&gt; <br />***Insert other code here*** <br />&lt;?php endif ?&gt;<br /><br /><br />Kenny<br />]]></description>
          <pubDate>Mon, 20 Jul 2009 15:20:55 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198310#post2198310</guid>
        </item>
                <item>
          <title>Re: [isdoo] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198309#post2198309</link>
          <description><![CDATA[I know what you mean, isdoo. It's what I had in mind when setting it up, but it isn't working.  It puts the link on the page just fine when there is some text in the $link_creatorRecord field, but the link stays on the home page when I empty the field.  That's why I was wondering about an &quot;else&quot; statement that would remove the link.  Or maybe there is something else I could do to get it to work.  Thanks for your help,<br />Farnham<br />]]></description>
          <pubDate>Mon, 20 Jul 2009 14:38:43 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198309#post2198309</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198298#post2198298</link>
          <description><![CDATA[Your client could put anything in the field link_creatorRecord['emergency_link'] and then simply blank the field out, with nothing in it to hide the link.<br />]]></description>
          <pubDate>Mon, 20 Jul 2009 03:30:42 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198298#post2198298</guid>
        </item>
                <item>
          <title>Re: [isdoo] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198296#post2198296</link>
          <description><![CDATA[Thanks very much, isdoo. Your script works like a charm putting the &quot;Emergency Information&quot; link on the home page, but when the emergency is over, I can't get the link to go away. What I'm trying to do is have my client write &quot;yes&quot; in a CMSB field to show the link when an emergency arises and then remove the link when the emergency is over by emptying the field (or changing it to &quot;no&quot;).  Would an &quot;else&quot; statement do it? I've tried writing one, but I really don't know PHP and haven't succeeded. Is this the way to go?<br /><br />Farnham<br />]]></description>
          <pubDate>Sun, 19 Jul 2009 15:20:28 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198296#post2198296</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198286#post2198286</link>
          <description><![CDATA[if you are checking a field in a table to see if it is populated then, you would normally use something like...<br /><br />&lt;?php if($newsRecord['field']): ?&gt; <br />Action <br />&lt;?php else: ?&gt; <br />&lt;?php endif ?&gt;<br /><br />So perhaps<br /><br />&lt;?php if($link_creatorRecord['emergency_link']): ?&gt; <br />&lt;script type=&quot;text/javascript&quot;&gt;<br />{<br />document.write('&lt;a href=&quot;http://xxxx.org/emergency_infoDetail.php&quot; class=&quot;navlinks_emergency&quot;&gt;Emergency Information&lt;/a&gt;');<br />}<br />&lt;/script&gt; <br />&lt;?php else: ?&gt; <br />&lt;?php endif ?&gt;<br />]]></description>
          <pubDate>Sun, 19 Jul 2009 02:51:22 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198286#post2198286</guid>
        </item>
                <item>
          <title>Re: [fleff] Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198282#post2198282</link>
          <description><![CDATA[I've also tried this:<br /><br />&lt;script type=&quot;text/javascript&quot;&gt;   <br /> 			 		if ('$link_creatorRecord[&quot;emergency_link&quot;]' == 'yes')   <br />  						{   <br />    						document.write('&lt;a href=&quot;http://xxxx.org/emergency_infoDetail.php&quot; class=&quot;navlinks_emergency&quot;&gt;Emergency Information&lt;/a&gt;'); <br />  						}   <br />				&lt;/script&gt;<br /><br />Farnham<br />]]></description>
          <pubDate>Sat, 18 Jul 2009 15:56:27 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198282#post2198282</guid>
        </item>
                <item>
          <title>Display/hide link</title>
          <link>https://interactivetools.com/forum/forum-posts.php?postNum=2198279#post2198279</link>
          <description><![CDATA[My client wants to be able to display a link on his home page to another page only under certain circumstances. Otherwise no visible link. I've set up a page in CMS Builder that can have either some text or no text at all and tried to trigger the visibility of the link on the home page only if the client enters some text on the blank page. A JavaScript then checks to see if the page is blank and if not, displays the link on the home page. The script is:<br /><br />&lt;div class=&quot;text_11_vb_red&quot;&gt;<br />	&lt;script type=&quot;text/javascript&quot;&gt;   <br /> 	if ('http://xxxx.org/emergency_linkDetail.php')   <br />  		{   <br />    		document.write('&lt;a href=&quot;http://xxxx.org/emergency_infoDetail.php&quot; class=&quot;navlinks_emergency&quot;&gt;Emergency Information&lt;/a&gt;'); <br />  		}   <br />	&lt;/script&gt;<br />&lt;/div&gt;<br /><br />I tried this JavaScript in one of my Listings Manager websites and it worked fine using a listings field ($lfield52$) in the &quot;if&quot; statement to see if it was empty. But I can't figure out how to get it to check the content of the emergency_linkDetail.php page to see if it is empty -- or if it has a keyword on it that will trigger the link. If LM were still available, I would have done it there. But don't get me wrong, I think CMS Builder is great.<br /><br />Maybe there's a better way to accomplish this. Any help would be much appreciated.<br /><br />Thanks,<br /><br />Farnham<br />]]></description>
          <pubDate>Fri, 17 Jul 2009 20:25:54 -0700</pubDate>
          <guid isPermaLink="true">forum-posts.php?postNum=2198279#post2198279</guid>
        </item>
              </channel>
    </rss>
  