Welcome to Geeklog Tuesday, December 10 2019 @ 09:30 pm EST

Geeklog Forums

how to insert { tag in template


Status: offline

ivy

Forum User
Full Member
Registered: 25/11/04
Posts: 312
Location:Tokyo Japan
How can I insert {xxx} tag in template?

like this
PHP Formatted Code
<a href="" data-uk-lightbox="{group:'my-group'}">...</a>

see http://getuikit.com/docs/lightbox.html
now, {goup... is disappeard.
Geeklog Japan https://www.geeklog.jp
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
Ivy,

Try to add a space between { and content

PHP Formatted Code
<a href="" data-uk-lightbox="{ group:'my-group' }">...</a>

I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

Laugh

Site Admin
Admin
Registered: 27/09/05
Posts: 1384
Yeah that is the problem with using the curly brackets to define Geeklog template variables. Adding the space stops the template class from replacing what it thinks is a unused template variable with an empty string.
One of the Geeklog Core Developers.
 Quote

Status: offline

ivy

Forum User
Full Member
Registered: 25/11/04
Posts: 312
Location:Tokyo Japan
Thanks! It works correctly.

PHP Formatted Code
Try to add a space between { and content

Geeklog Japan https://www.geeklog.jp
 Quote

All times are EST. The time is now 09:30 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content