Unyson-Shortcodes-Extension icon indicating copy to clipboard operation
Unyson-Shortcodes-Extension copied to clipboard

[Question] Duplicating "Section" shortcode ?

Open 2Fwebd opened this issue 11 years ago • 8 comments

Hello,

I'm having trouble to create a new item wrapper like "section shortcode" for the page builder. So my question is : is that only possible ? Because I duplicated it, renamed everything and as a result : no error but that doesn't works. As I know it's quite a special shortcode so I'm just wondering.

Thanks,

2F

2Fwebd avatar Jun 08 '15 20:06 2Fwebd

So it's not possible ? If so, no problem I'll find another way :) 2F

2Fwebd avatar Jun 11 '15 10:06 2Fwebd

Hello, It should be possible. I can't say for sure because I didn't made it.

ghost avatar Jun 11 '15 10:06 ghost

Hi,

I can confirm I've duplicated the section shortcode into a plugin which I'm using in a theme that's in development and it's working fine.

martinburdon avatar Jul 12 '15 21:07 martinburdon

@martinburdon can you offer an example how you did it?

dmbostan avatar Sep 27 '16 06:09 dmbostan

@dmbostan sure thing

I have my shortcodes extracted out into a plugin as they're plugin territory, in my plugin I have the following folder structure for shortcodes which you need to follow for Unyson.

extensions/shortcodes/shortcodes

Then in that folder I have my shortcodes, for the section shortcode I simply took the section shortcode folder from the Unyson plugin and added it, then modified it to suit my needs. You can find it in the Unyson plugin at the following path:

unyson/framework/extensions/shortcodes/shortcodes/section.

Here is a screenshot of my plugin folder structure for clarity:

screen shot 2016-09-27 at 20 06 31

Hope that helps

martinburdon avatar Sep 27 '16 19:09 martinburdon

@martinburdon do you have the Save template option in your custom section? It seems to be missing for duplicated sections. The default, however, is ok.

dmbostan avatar Feb 27 '17 14:02 dmbostan

Hey @dmbostan,

It looks like it's not there for me - I'm assuming this feature was added after I had duplicated the section shortcode and overridden it. I guess it could be added in by duplicating the latest version of the section shortcode as in my comment above then adding your overwrites in again.

Hope that helps

martinburdon avatar Mar 05 '17 21:03 martinburdon

I'm not sure, but I remember the templates for sections being hardcoded for the original section shortcode only. I can be wrong, though.

andreiglingeanu avatar Mar 05 '17 21:03 andreiglingeanu