Search

Hi,

Probably there’s another topic about it, but I spent 1 hour searching without luck.

Here’s my problem: I need to put a PHP tag inside an attribute.

<form id="signup" action="<?=$_SERVER['PHP_SELF']; ?>" method="get">

How do I escape characters inside attributes?

Thanks in advance.

Hello, Fabio.

You can’t use PHP in XLST like that. Not sure what you’re trying to do but you can use $current-url instead.

<form id="signup" action="{$current-url}" method="get">

You can find more information about parameters, here.

Acctualy I’m trying to integrate a MailChimp form. Here’s the full code:

        <form id="signup" action="<?=$_SERVER['PHP_SELF']; ?>" method="get">
        <fieldset class="newsletter" >
            <h3>Newsletter</h3>
            <div id="response">
                <xsl:text disable-output-escaping="yes">&lt;? require_once('inc/store-address_br.php'); if($_GET['submit']){ echo storeAddress(); } ?&gt;</xsl:text>
            </div>
            <input id="news_email" type="email" placeholder="digite seu email" />
            <input id="news_ok" type="submit" value="OK" />
        </fieldset>
    </form>

You should understand the basics concepts of Symphony before anything. Take a look on some tutorials or articles first. By the way, Lewis created an extension for that purpose.

See MailChimp extension. I hope it helps.

Thank you Rainer, I spent so much time searching thru the forum and forgot to search thru the extensions database! :$

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details