Hello all...another dumb question, but I can't seem to get the search function to give me results I need, so sorry if this has been asked before.
I am trying to output simple HTML center tags...I don't know if I can embed them in here or if it will make the output all screwy. Instead of outputting the tag, it is outputting the literal string with the angle brackets and all. Anyone know what is wrong? (I tried two different ways).
Code:
$output->Text('<center>');
$output->Text("<center>" . _FMM_MESSAGE . "</center>");
Thanks[/b]</center>
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 07:01 AM
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 06:41 AM
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 06:27 AM
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 01:29 AM
- mdee created topic »How to implement returnpage ?« 01:00 AM
- nestormateo responded to »Fillters in Clip« 24. May
- damon responded to »Can the Updated Version Check be Turned Off (Z 1.3)« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
HTML tags in $output->Text()
-
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2330
You need to set the input mode to "verbatim" before the tags...and then back to "parse" after you're done. So in practice:
$output->SetInputMode(_PNH_VERBATIMINPUT);
$output->Text('<center>');
$output->Text('any other HTML stuff...');
$output->SetInputMode(_PNH_PARSEINPUT);
...also note that the tag you have in your sample above is incorrect. It should be:
...</center> -
- Rank: Team Member
- Registered: Jan 02, 2003
- Last visit: Oct 21, 2009
- Posts: 800
The center tag is deprecated, better use CSS
And pnHTML is declared legacy, for new modules you are encouraged to use pnRender for templating.
--
"He is not dangerous, he just wants to play...." -
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2330
Until someone starts producing some docs on writing templated modules (other than code comments) it's going to be fairly attractive. Now that pnHTML is phasing out, I'm seeing mod-writing docs for it...I certainly hope that's not the case for pnRender.
BTW...loving pnForum! -
**unknown user**
- Rank: Senior
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 2330
Try here Bri... English support site for pnForum...
- Moderated by:
- Support
