174 posts
  • Exclusive Author
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • India
  • Sold between 1 000 and 5 000 dollars
GraphiTivity says

Hey guys is it possible to make working short codes in html templates to build widgets etc as we do in wp.

Ex

If I add some code like [calendar] in a html page it should display a calendar. Is this possible? If so please share any helpful links

Thanks V

1466 posts
  • Has been a member for 2-3 years
  • Exclusive Author
  • Sold between 10 000 and 50 000 dollars
  • Bought between 10 and 49 items
  • Referred between 1 and 9 users
  • Croatia
OriginalEXE says

It’s possible with Javascript templating languages, for example: https://github.com/janl/mustache.js

32 posts
  • Bought between 1 and 9 items
  • Exclusive Author
  • Has been a member for 0-1 years
  • Sold between 100 and 1 000 dollars
PixelDima says
14 posts
  • Referred between 1 and 9 users
  • Exclusive Author
  • Bought between 1 and 9 items
  • Sold between 1 000 and 5 000 dollars
  • Italy
  • Has been a member for 1-2 years
Epeo says

The shortcodes are fine but if you do an html version is better to not include them, the reason is the same that makes it possible: JS. If there is an error with js or is simply deactivated the template will lose all the content. That’s why the CMS like WP, Joomla, etc uses PHP.

313 posts Yes We Can
  • Bought between 1 and 9 items
  • Elite Author
  • Europe
  • Exclusive Author
  • Football Contest Participant/Runner-up
  • Has been a member for 1-2 years
  • Most Wanted Bounty Winner
  • Referred between 50 and 99 users
  • Sold between 100 000 and 250 000 dollars
CRIK0VA says

The shortcodes are fine but if you do an html version is better to not include them, the reason is the same that makes it possible: JS. If there is an error with js or is simply deactivated the template will lose all the content. That’s why the CMS like WP, Joomla, etc uses PHP.

+1. No needs to use Shortcodes in HTML.

1131 posts The Last Man Standing
  • Elite Author
  • Author had a Free File of the Month
  • Has been a member for 3-4 years
  • Referred between 10 and 49 users
  • Exclusive Author
  • Bought between 10 and 49 items
  • Sold between 50 000 and 100 000 dollars
  • Football Contest Participant/Runner-up
+1 more
ImanGM says

The shortcodes are fine but if you do an html version is better to not include them, the reason is the same that makes it possible: JS. If there is an error with js or is simply deactivated the template will lose all the content. That’s why the CMS like WP, Joomla, etc uses PHP.

+1

If you want to do this in a special situation, it’s ok but generally it’s better to leave it as a simple HTML page.

48 posts Umbrella
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a File in an Envato Bundle
  • Exclusive Author
  • Has been a member for 1-2 years
  • Europe
  • Bought between 10 and 49 items
  • Referred between 10 and 49 users
UmbrellaStudios says

Hi

I just found a Shortcode Parser which does what you need.

https://www.npmjs.org/package/shortcode-parser

Peace.

174 posts
  • Exclusive Author
  • Bought between 10 and 49 items
  • Has been a member for 4-5 years
  • India
  • Sold between 1 000 and 5 000 dollars
GraphiTivity says

WOW! thanks so much… you guys are awesome. it would have taken me ages to discover all this…

by
by
by
by
by
by