3 posts by 2 authors in: Forums > CMS Builder
Last Post: August 20, 2010   (RSS)

Hello again,

Seems to be a day of trouble here :)

We have done a lot to link build and get our name out there and we are beginning to experience a problem with the links that point to our "hidden" listings.

The hidden field itself works wonderfully but the issue arises when there is a link out there on the internet linking directly to a hidden listing. When a user navigates to the page it is a MESS of "Undefined Index.....etc". We are trying to redirect users to the homepage if they go to such a link.

I have tried to accomplish this in our health care rental category with the code below. We have changed the value of our hidden field to "Active" for unchecked and "In-Active" for checked.
<?php if ($healthcare_equipment_rentalsRecord['hidden'] != "Active") {header("Location: http://www.ourhomepage.com");} ?>

I have also tried if the hidden field is equal to "In-Active".

<?php if ($healthcare_equipment_rentalsRecord['hidden'] == "In-Active") {header("Location: http://www.rentittoday.com");} ?>

These just direct ALL links, hidden or not, to the homepage.

I believe that the issue may be that because the listing is hidden that ALL parts of the record are "undefined" and therefore it cannot even pull the data from the hidden field itself.

Any suggestions would be greatly appreciated!

Thank You!

Re: [rentittoday] Redirecting hidden listings

I solved my own issue!

After printing the value of the "hidden" field to the page I realized that even though we changed the field value in the admin section to "active" and "in-active" the values displayed for the record on our viewers are still "1" and "0". so by changing it works perfectly!

<?php if ($healthcare_equipment_rentalsRecord['hidden'] != "0") {header("Location: http://www.ourhomepage.com");} ?>

Thanks! :)