dragan Posted April 19, 2019 Share Posted April 19, 2019 For the first time ever I stumbled over this post: https://processwire.com/blog/posts/processwire-3.0-alpha-2-and-2.6.22-rc1/#new-module-file-compiler-tags I installed the module, and tried various stuff like described in the example codes, but nothing worked. I always just see {title} or {page.title} in the rendered HTML in the browser. Does anyone use FC Tags at all? Is there anything else I need to do to make it work (e.g. write something in site/config.php) ? Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 19, 2019 Share Posted April 19, 2019 Just installed the module, deleted compiled files, tried {these} {tags} in several places/templates but without success. I haven't read the whole post yet but I guess there is some small detail which is key to this feature. Link to comment Share on other sites More sharing options...
dragan Posted April 19, 2019 Author Share Posted April 19, 2019 Yeah, it's weird. I tried several things: Use {page.title} in basic-page.php, in _main.php. Set basic-page template file compile setting explicitly to "Yes (template file and files included from it)" - nothing. I briefly looked at @ryan's code, and was a bit surprised that the module isn't set to autoload. And apparently it's not defined to run on some hook. But since it extends the FC module, maybe that's taken care of elsewhere... Link to comment Share on other sites More sharing options...
dragan Posted April 19, 2019 Author Share Posted April 19, 2019 hmm, now all of a sudden it works (after deleting everything in site/assets/cache/FileCompiler/site/). <h1>{page.title}</h1> <p>{body}</p> <p>{id}</p> <p>{parent.title}</p> ^ all of these output exactly what you would expect now. 1 Link to comment Share on other sites More sharing options...
wbmnfktr Posted April 19, 2019 Share Posted April 19, 2019 So.... now it works. It was an easy fix. Remove the first/namespace line from your file and it works. Link to comment Share on other sites More sharing options...
dragan Posted April 19, 2019 Author Share Posted April 19, 2019 (edited) Can anyone of the forum admins please update the thread-title and include [SOLVED] ? I don't know how I can edit the title myself... d'oh - just edit the first post... and it gives you the possibility to modify the thread title as well. Edited April 19, 2019 by dragan forum edit confusion Link to comment Share on other sites More sharing options...
tomaskostadinov Posted August 9, 2019 Share Posted August 9, 2019 Just to mention for anyone having problems with the File Tag Compiler and field rendering to have a look at https://github.com/processwire/processwire-issues/issues/313 This solved my problem. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now