I’m thinking about writing a module / extension to extend some functionality that would, ideally, allow a user to drop an {image-gallery} tag, hypothetically speaking, into the content of a body custom field for a post and have it parse.
My question is this: Is there a hook in EE2 at the beginning of rendering a custom field tag in a template, so that I could pre-parse things in the content after it’s been retrieved from the database?
Is what I’m saying clear? Not sure if I always explain well enough.
Thanks. That will take me in the right direction. I don’t want {exp} tags parsable in entry fields, but that means there is a hook used that I’m going to want. So, downloading to take a look at the hook and then I’ll write my own plugin 😊
Perfect. I had tried to use the Googs (read: google) to find that but apparently my search term choice is sub-par.
Thank you.
This is kind of what I am looking for as well. I tried allow_eecode, but couldn’t get it work. For example, I put the following code into an entry field, and when the template shows the entry field, it still just output the code itself directly, nothing gets parsed as expected. Please help!
{exp:allow_eecode}
{exp:channel:entries channel="news_articles" limit="1" disable="pagination" status="Featured Top Story" }
img/news-article-image.png
<h4>{title}</h4>
<h5><span class="by">By </span> {author}</h5>
{article_excerpt}
<a href="http://{title_permalink=" class="read_story">Read Story</a>
{/exp:channel:entries}
{/exp:allow_eecode}Is there a hook in EE2 at the beginning of rendering a custom field tag in a template, so that I could pre-parse things in the content after it’s been retrieved from the database?
There is! This may be what you’re looking for:
http://ellislab.com/expressionengine/user-guide/development/extension_hooks/module/channel/index.html#channel_entries_tagdata_end
I actually just used it on an EE1 extension for something. Even though it’s EE1 you can see how it was used here https://gist.github.com/1054782#L188
Edit: I just realized that this thread is a month old. I hope it’s helpful regardless! 😊
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.