PDA

View Full Version : Web Assist Markup


neo314
05-14-2009, 04:42 PM
When I use ADDT extensions, I have a markup language to use in their GUI/Code that makes it easy to express complex values. For example, if I have a Session value for the first and one for the last name of a user, I can enter in the GUI:
{SESSION.fname} {SESSION.lname}and the code comes out:
"{SESSION.fname} {SESSION.lname}"which gets translated to:
$_SESSION['fname']." ".$_SESSION['lname']Whenever I try to add something more complex than a simple value, I seem to have to hand code it and if I reopen the GUI I get the message that a server side value is configured incorrectly.

Is there a proper way to enter something like, "https://".$_SERVER['SERVER_NAME']."/destination.php" into web assist GUI's that the extensions will consistently accept?

Here is a screenshot example of where I would like to be able to add a value like that. What syntax works.

67

Ray Borduin
05-15-2009, 06:20 AM
In our interfaces you can use the syntax:

<?php echo($_SESSION['fname']." ".$_SESSION['lname']); ?>

There is no special language, but you can use any php, functions, or other code you want into any webassist interface that includes a lightning bolt using this syntax.

neo314
05-15-2009, 06:50 AM
So is this syntax essential? Perhaps that is my issue.

I would normally write this as (which seems to throw errors:

<?php echo $_SESSION['fname']." ".$_SESSION['lname']; ?>

and Web Assist seems to prefer:

<?php echo($_SESSION['fname']." ".$_SESSION['lname']) ?> (Note no ending semi-colon)

Ray Borduin
05-15-2009, 07:13 AM
you can have it with or without the semi colon... I think we may require the parenthasis... notice "echo(" compared to "echo".

If you use the lighning bolt and chose a dynamic value, it will use the correct syntax and you can edit it from there, that is what I usually do.