Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-02-07 12:49:32
- janw
- Member
- From: Groningen
- Registered: 2005-11-18
- Posts: 47
echo html elements
I want to use something like this:
<code>
<txp:php>
$my_var = ‘test’;
echo ‘<h1>’ . $my_var . ‘</h1>’</txp:php>
</code>
Now I want TP to display test in heading 1 and not:
<code><h1>test</h1></code> as text.
What an I doing wrong?
Last edited by janw (2006-02-07 12:49:51)
Offline
Re: echo html elements
Where are you using this? < txp:php > is meant to be used in a page or a form, I don’t believe it will parse in an article.
Last edited by 1beb (2006-02-07 18:43:52)
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
#3 2006-02-07 18:50:38
- janw
- Member
- From: Groningen
- Registered: 2005-11-18
- Posts: 47
Re: echo html elements
I want 1 video page which my clients can alter as an article.
They only have to set 1 variable and then it will play that film.
Something like this:
$var = 5;
if (isset($_GET[“id”])) {
$var = $_GET[“id”];
}
Box with video here (default plays 5)
Link to video 1 (http://www.mysite.nl/index.php?s=video&id=1)
Link to video 2 (http://www.mysite.nl/index.php?s=video&id=2)
Link to video 3 (http://www.mysite.nl/index.php?s=video&id=3)
Link to video 4 (http://www.mysite.nl/index.php?s=video&id=4)
Link to video 5 (http://www.mysite.nl/index.php?s=video&id=4)
So it’s easy for my client to add 1 line and change 1 value.
So is it possible to echo html-elements?
Offline
Pages: 1