-
☆ A M B ☆
- 3,112 Posts
I created a placeholder:
<?php
$foo = 'HELLO FOO!';
$modx->setPlaceholder('foo',$foo);
Then try to insert it inside the <head> tags with regClientStartupHTMLBlock
<?php
$bar = 'the [+foo+]';
$modx->regClientStartupHTMLBlock($bar);
The result is only
’the ’.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
If you’re seeing "the" alone, the odds are that the placeholder tag *is* being placed in the head, but at the time when it’s processed, the placeholder hasn’t been set yet.
-
☆ A M B ☆
- 3,112 Posts
Well, I thought MODx’s parser replaces the [+placeholder+] start from the <html> tag till it ends, no?
As we’re speaking, I decided to str_replace the variable instead.
Rico
Genius is one percent inspiration and ninety-nine percent perspiration.
Thomas A. Edison
MODx is great, but knowing how to use it well makes it perfect!
www.virtudraft.com
Security, security, security! |
Indonesian MODx Forum |
MODx Revo's cheatsheets |
MODx Evo's cheatsheets
Author of
Easy 2 Gallery 1.4.x,
PHPTidy,
spieFeed,
FileDownload R,
Upload To Users CMP,
Inherit Template TV,
LexRating,
ExerPlan,
Lingua,
virtuNewsletter,
Grid Class Key,
SmartTag,
prevNext
Maintainter/contributor of
Babel
Because it's hard to follow all topics on the forum, PING ME ON TWITTER
@_goldsky if you need my help.
Quote from: goldsky at Oct 04, 2010, 02:55 PM
Well, I thought MODx’s parser replaces the [+placeholder+] start from the <html> tag till it ends, no?
As we’re speaking, I decided to str_replace the variable instead.
Not a bad idea.
In Revolution, you can use [[!+placeholder]] to make the placeholder uncached and delay it’s processing, but that’s not an option in Evo.