designetic Reply #1, 11 months, 2 weeks ago
Hi,
I am using the latest Evolution Release and have phX installed.
My challenge is that I have a TV that is a date variable(Unixtime) used in a Ditto call.
It formats nicely using &dateFormat parameter without any problems
I now want to further work on the [+date+] placeholder that is created by Ditto.
Instead of outputting it as it is, I would like to split it so that I have a Month separated from Day. I use the format string `%b %d`. So intended to split it using the space as a delimiter(straightforward in PHP)
Here are some of the things I tried that have failed me:
- I tried creating a snippet that calls and returns the [+date+] placeholder using $modx->getPlaceholder('date') and also tried $modx->placeholders['date']
- I tried and failed to understand how to create a custom extender, which I assume is what I need so I can split the [+date+] placeholder as I require using PHP. I have gone through the specific example in the example.extender.inc.php file but I have failed to make sense of it.
Here are some search results I went through but havent really helped me understand:
http://modxcms.com/forums/index.php/topic,27564.msg168495.html
http://modxcms.com/forums/index.php?topic=16013.0
http://modxcms.com/forums/index.php?topic=35848.0
http://modxcms.com/forums/index.php?topic=26641.0
From the WIKI
http://wiki.modxcms.com/index.php/Ditto_Custom_Placeholders
Perhaps I am slow (shrug), but I did try.
Hope someone can help.
Thanks for the great tool!!!
I am using the latest Evolution Release and have phX installed.
My challenge is that I have a TV that is a date variable(Unixtime) used in a Ditto call.
It formats nicely using &dateFormat parameter without any problems
I now want to further work on the [+date+] placeholder that is created by Ditto.
Instead of outputting it as it is, I would like to split it so that I have a Month separated from Day. I use the format string `%b %d`. So intended to split it using the space as a delimiter(straightforward in PHP)
Here are some of the things I tried that have failed me:
- I tried creating a snippet that calls and returns the [+date+] placeholder using $modx->getPlaceholder('date') and also tried $modx->placeholders['date']
- I tried and failed to understand how to create a custom extender, which I assume is what I need so I can split the [+date+] placeholder as I require using PHP. I have gone through the specific example in the example.extender.inc.php file but I have failed to make sense of it.
Here are some search results I went through but havent really helped me understand:
http://modxcms.com/forums/index.php/topic,27564.msg168495.html
http://modxcms.com/forums/index.php?topic=16013.0
http://modxcms.com/forums/index.php?topic=35848.0
http://modxcms.com/forums/index.php?topic=26641.0
From the WIKI
http://wiki.modxcms.com/index.php/Ditto_Custom_Placeholders
Perhaps I am slow (shrug), but I did try.
Hope someone can help.
Thanks for the great tool!!!
, I think you've provided me with an elegant solution. I didnt know Ditto had its internal phx. Thanks again, Susan!