Need advise

7 posts by 2 authors in: Forums > CMS Builder
Last Post: September 14, 2010   (RSS)

By thenetgirl - September 13, 2010

Originally the contact person was pulled by created.by but they hire receptionists so i hard coded that info on the page. Now 1 of the agents wants her contact info on her rentals. And I am not sure how to include that just for her.

Agents have homepages

http://www.montereyrentals.com/VacationRentalsDetail.php?65-17-162
Patricia

www.thenetgirl.com

Re: [thenetgirl] Need advise

By Chris - September 13, 2010

Hi thenetgirl,

Could you please post the complete PHP source code for that page?
All the best,
Chris

Re: [chris] Need advise

By thenetgirl - September 13, 2010

here ya go
Patricia

www.thenetgirl.com

Re: [thenetgirl] Need advise

By Chris - September 13, 2010 - edited: September 14, 2010

Hi thenetgirl,

I have an idea: how about a checkbox in your Accounts section called Display Contact Info? On your detail page, you can use an IF-ELSE to display either the record's created.by contact info or your hardcoded defaults, depending on whether the checkbox is checked.

<?php if ($vacation_rentalsRecord['createdBy.display_contact_info']): ?>
<!-- insert your old createdBy code here -->
<?php else: ?>
<!-- insert your hardcoded contact info here -->
<?php endif ?>


Does that make sense? Please let me know if you have any questions.
All the best,
Chris

Re: [thenetgirl] Need advise

By Chris - September 14, 2010

Hi thenetgirl,

Sorry, that was meant to read $vacation_rentalsRecord['createdBy.display_contact_info']. I've fixed my post above.

Does this work for you?

<?php if ($vacation_rentalsRecord['createdBy.display_contact_info']): ?>
<?php echo $vacation_rentalsRecord['createdBy.fullname']; ?><br />
<?php echo $vacation_rentalsRecord['createdBy.email']; ?><br />
<?php echo $vacation_rentalsRecord['createdBy.phone_number']; ?><br />
<?php else: ?>
Hardcoded<br />
Contact<br />
Info<br />
<?php endif ?>

All the best,
Chris

Re: [chris] Need advise

By thenetgirl - September 14, 2010

PERFECT PERFECT PERFECT!!!



Thank You your the best!!!
Patricia

www.thenetgirl.com