0

I'm fairly new to pyrocms and php in general. In pyrocms, you can create html partials and then in the pyro page you can call that partial like so

{{theme:partial name="my-partial"}} 

which will call my-partial.html that sits inside the

~/views/partials/

However when i call the partial using jquery $.load(), the lex parsing on that partial is not rendered. So you end up with {{ variables }} all over the page.

Just wondering why this happens and if here is a work around for this? Is this something to do with php having to call the server in order to render the lex or could this be something with the cms itself.

Not too sure where to start searching for a solution for this. I'm a bit in the dark with php.

  • Are you loading the partials by directly addressing them? (addons/shared_addons/themes/themes/partials/partial.html) – mgrueter Jun 17 '15 at 10:06
  • yeah, it does not load if i try to just pull the .html –  Jun 17 '15 at 13:29
  • yes, sorry, thats what i wanted to hint at. you need a controller function, build the partial with template->build(), but do template->set_layout() before that. I'll write a complete answer later... – mgrueter Jun 17 '15 at 16:28

1 Answers1

0

I am pretty sure that theme partials can only be called by using the Pyro tag as you have shown. ie: {{ theme:partial name="my-partial" }}. Not sure what you mean by $.load().

ikoniqoz
  • 11
  • 3
  • jquery load() uses ajax to call the html . With pyro using the idea of partial pages, that being code snippets of html rendered in the main layout, it seems like a perfect scenario with which to use jquery load() to pull page sections without a page refresh –  Jun 12 '15 at 07:12