-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modifying render() to prevent recursion? #163
Comments
What do you need this for? |
well....since you asked... context:
Ultimately, i am attempting to build a helper that parses the page's body content and generates a table of contents for the page. Call the helper toc.js. The process i am working with is:
#3 i can do, once i have an array or object of headings. That depends on… #2 i hope to do with the help of cheerio.js. doing this depends on… #1. i experimented with adding the body content with in the nameOfThePage.html page. i tried making toc.js a block helper in the layout-page, with {{> body}} as the block content, like so:
but that isn't really the right spirit of how it should work. I considered adding the page to the pageData object, but that feels needlessly bloated. Ive tried accessing panini itself, and getting the body content. I can get part-way, but it is the raw content - pre-rendering - and I cant figure out how to get it post-rendered. |
modification assistance request:
Are there any suggestions about how to modify panini.render() to
right now, that will result in a render loop.
advice?
or, alternatively, a way to access the rendered body - the var page in render() or better yet, the partial 'body' - from other helpers?
The text was updated successfully, but these errors were encountered: