Display/hide link

15 posts by 5 authors in: Forums > CMS Builder
Last Post: July 22, 2009   (RSS)

By fleff - July 22, 2009

I tried that, jdancisin, but still no luck. Thanks for your suggestion.

Re: [fleff] Display/hide link

By zip222 - July 22, 2009 - edited: July 22, 2009

One more suggestion...

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:

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php

require_once "/home/content/n/o/b/noblehorizons/html/cmsAdmin/lib/viewer_functions.php";

list($link_creatorRecords, $link_creatorMetaData) = getRecords(array(
'tableName' => 'link_creator',
'where' => whereRecordNumberInUrl(1),
'limit' => '1',
));
$link_creatorRecord = @$link_creatorRecords[0]; // get first record

// show error message if no matching record is found
if (!$link_creatorRecord) {
print "Record not found!";
exit;
}

?>


And you may also need to change the extension to .php

By fleff - July 22, 2009

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 "Not Found" message. We'll have to redirect them to the new URL. But it does what the client asked for. That's what matters.

Thanks again for your help,

Farnham

Re: [fleff] Display/hide link

By zip222 - July 22, 2009

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.

http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm