-
☆ A M B ☆
- 24,524 Posts
Looks like a custom output modifier
Thanks Susan, I tried that and it worked.
Though its not respecting the Media Source dependant TVs. ie. If I use an image tv with full path to the image, it shows up alright, but if I use the tv with media source, it just shows the filename and does not incorporate the basePath/url.
-
☆ A M B ☆
- 24,524 Posts
Hm. It's getting late here, but I usually do it the other way around:
[[+imageTV:notempty=`<img src="[[+imageTV]]" alt="" ... >
Or if the output will be more complicated use chunks for empty and notempty.
Actually I am not using this in a template/chunk but in Grid Container settings. So, I found out that if I just put snippet name in "Output Filter" field, it returns the TV value.
But in this case, the snippet code above does not incorporate the basepath from media source.
-
☆ A M B ☆
- 24,524 Posts
-
☆ A M B ☆
- 3,112 Posts
Quote from: zaigham at Apr 14, 2014, 03:36 PMThanks Susan, I tried that and it worked.
Though its not respecting the Media Source dependant TVs. ie. If I use an image tv with full path to the image, it shows up alright, but if I use the tv with media source, it just shows the filename and does not incorporate the basePath/url.
How about setting up the "Output Type" of the TV that will retrieve the path based on Media Source?
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.
@goldsky If I use the tv in template or a chunk, it outputs the path including baseurl. So I don't see the need for "Output Type", but I am open for ideas.
-
☆ A M B ☆
- 3,112 Posts
@zaigham,
hm... you're right.
It's missing the media source variable.
I will look on this.
https://github.com/goldsky/GridClassKey/issues/69
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.
@goldsky Thanks! and I must say its a brilliant addon! :-D