Using variables in the wysiwyg editor

5 posts by 2 authors in: Forums > CMS Builder
Last Post: August 6, 2009   (RSS)

Re: [eduran582] Using variables in the wysiwyg editor

By Chris - August 6, 2009

Hi eduran582,

Does the website maintainer need to change the text "Your reservation for" and "of people has been made" very often? That seems like the kind of thing that could be safely hardcoded into your PHP viewer file.

Does that help at all?
All the best,
Chris

Re: [chris] Using variables in the wysiwyg editor

By eduran582 - August 6, 2009

Hi Chris,

Thanks for replying. I figured because of the nature of the "wysiwyg" that this would not be a possibility but wanted to make sure. I've already told the maintainer they will have to revise the message they maintain to reflect a reference to the variables that will be displayed before the "content" is displayed (as in a header). So what I displayed would be changed to say something like:

"Your reservations for the number of people, as displayed above, has been made."

Thanks again for the quick reply.

Eric

Re: [eduran582] Using variables in the wysiwyg editor

By Chris - August 6, 2009

If you wanted to get your hands dirty with PHP, you could always create your own placeholder system. e.g.:

<?php
$content = $record['content'];
$content = str_replace("(***NUM***)", $record['num'], $content);
echo $content;
?>

All the best,
Chris

Re: [chris] Using variables in the wysiwyg editor

By eduran582 - August 6, 2009

Hmmm... interesting. Thanks for the hint, Chris! [;)]

I might try something like this after I get this thing going.

Eric