We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
importing from WP many images are often wrapped in a
[caption id="attachment_8393" align="alignnone" width="111" caption="Caption Text Goes Here!"] image here [/caption]
perhaps some way to either parse and store these as html on import OR perhaps a SS shorttag that acts in the same manner as WP captions?
The text was updated successfully, but these errors were encountered:
If your happy to ignore the parameters on the caption (which we where) you can just use a standard shortcode parser registering a shortcode called caption (https://docs.silverstripe.org/en/3.2/developer_guides/extending/shortcodes/)
Here is the function I used.
public static function CaptionShortcode($arguments, $content = null, $parser = null, $tagName) { return "<div class='image-caption'>" . $content . "</div> "; }
with registration in _config.php of ShortcodeParser::get('default')->register('caption', array('Page', 'CaptionShortcode'));
ShortcodeParser::get('default')->register('caption', array('Page', 'CaptionShortcode'));
Sorry, something went wrong.
happy to accept a pull request on the WIP improved importer at #21
No branches or pull requests
importing from WP many images are often wrapped in a
[caption id="attachment_8393" align="alignnone" width="111" caption="Caption Text Goes Here!"]
image here
[/caption]
perhaps some way to either parse and store these as html on import OR perhaps a SS shorttag that acts in the same manner as WP captions?
The text was updated successfully, but these errors were encountered: