SmartyPants and ProBlog

Permalink
Has anyone been able to tie ProBlog and SmartyPants together? That is, has anyone feed the output from ProBlog through SmartyPants on the way to be rendered in a template? Where do you hook in? Did you override a ProBlog file? Which one?

Bob

bobrocke
 
planist1 replied on at Permalink Reply
planist1
What is the folder structure of the problog package? I have the pronews package and I would modify the root/packages/pronews/blocks/content/templates/news_post/view.php
JohntheFish replied on at Permalink Reply
JohntheFish
You should be able to use any of the approaches I do with Magic Data. Have a look at the code in Magic Data Templates and in Magic Yogurt.

In Magic Yogurt the area class extension is a very safe approach.

Which works best all depends on the context.
bobrocke replied on at Permalink Reply
bobrocke
Thanks for that pointer. I'll take a look there.
bobrocke replied on at Permalink Reply
bobrocke
Where, in Magic Yogurt, would it be best to look?

Bob
enlil replied on at Permalink Reply
enlil
in magic yogurt, look in the page type php files at how the magic data is integrated...
bobrocke replied on at Permalink Reply
bobrocke
OK, I see what's up.

From a pure MVC point of view, should the logic for "magic" be in the model or in the controller? Ideally, I would have thought in the controller.

Is there a concrete5 best practice?

Bob
JohntheFish replied on at Permalink Reply
JohntheFish
So much depends on the situation and at what stage of the page rendering process you want to apply it. Things to consider:
- is the outcome cacheable?
- what happens if it is cached?
- does it depend on who the user is?
- can it change with iterations within a list?
- does it change with time?

Back to the original title, if you look inside the views and templates for pro blog, you will see where magic data is applied within it.