jsantari Posted April 15, 2013 Posted April 15, 2013 Trying out the shortcodes and it works but - I created a shortcode for youtube then put one on a page and it works fine. I then added a second one for another video and the second one works but the first one is now not parsed? I tested this a bit further and I can have a second shortcode on a page if it has a different name.
jsantari Posted April 15, 2013 Author Posted April 15, 2013 Sure - here is my sortcode setup $shortcode = $modules->get('MarkupShortcodes'); $shortcode->add('youtube', function($atts){ return '<iframe width="560" height="315" src="http://www.youtube.com/embed/'.$atts['name'].'" frameborder="0" allowfullscreen></iframe>'; }); $shortcode->add('myname', function($atts){ return 'My name is '.$atts['name']; }); Here is what is in my content page. One Bedroom [youtube name="Akmcolo_ETE" ]One Bedroom - this one does not appear after I add the second one below One Bedroom with Whirlpool [youtube name="bD0D_LotZQo" ]Two Bedroom [myname name="JIM" /] - testing a second shortcode
Nico Knoll Posted April 15, 2013 Posted April 15, 2013 Well, I guess my module saves the shortcode into an array with e.g. youtube as key, so I guess this will overwritten. I'll add a solution in the next update - thanks for finding!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now