Skip to content
This repository was archived by the owner on Jan 26, 2019. It is now read-only.
This repository was archived by the owner on Jan 26, 2019. It is now read-only.

How to extend Context in custom helper? #148

Description

@jcubic

I wan to create custom helper sql:

<ul>
{{#sql SELECT * FROM users}}
   <li>{{username}}<br/>
   <ul>
      {{#sql SELECT * from files where user.id = [id]}}
          <li>{{filename}}</li>
      {{/sql}}
    </ul></li>
{{/sql}}
</ul>

how can I use Context in custom helper to make it work? Also if I'm in helper and call $context->get('id'); will it return the id from sql higher in hierarchy? Do I need to modify Helpers.php to add this helper or is there a way to do it outside of the library in user code?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions