Display/hide link

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

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

By ross - July 22, 2009

Hi.

Thanks for helping out on this one :). I really appreciate and I know Farnham does too.
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

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