Closed jordanlev closed 10 years ago
So I guess my question is: can this module be altered such that the "Path To Templates" setting is utilized in the render function as well (like it is currently being used in the renderTable function)?
As in the other thread stated, I wouldn't change the usual render process in the frontend. As for your other suggestion: This seems legit. I think in the beginning the module worked even with alternate template file names since the pure $page->render() surely uses the alternate file if present. So perhaps another solution could be to check if an alternative template path is given otherwise use the usual render process. Have to check that.
I just submitted a pull request (#7) with my code from above, which now uses both the PageTableExtended's "Path to Templates" setting AND the template's "altFilename" setting.
fixed by #7. thanks
In relation to my now-closed PR #5, I think the problem I'm having is due to the fact that the normal "render" function (which I believe is called when the field is displayed on the front-end of the site) uses the normal PW behavior of checking for an "alt filename", etc etc... but in the "PageTable Render Layout Options" one can specify a separate "Path to Templates" which is used only when the editing table is rendered (in the admin dashboard).
This is problematic for me because I want to use the same file for rendering both (and then within that file I will use the
$options['pageTableExtended']
setting to determine if this is a front-end display or an editing display).So I guess my question is: can this module be altered such that the "Path To Templates" setting is utilized in the
render
function as well (like it is currently being used in therenderTable
function)? I unfortunately don't understand enough about the internals of PW to know the best way to achieve that.If that is not a possibility, then I suggest at least making a change to the renderTable function so that it takes into account the "altFilename" setting of a template, for example:
Thanks!