Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Makoto Posted March 8, 2020 Posted March 8, 2020 Whenever writing apps that support reviews or comments, it seems like we're supposed to just copy and paste our own template for what is really the same core logic throughout most of the suite. Specifically, this is what I mean: Every application has their own reviews.phtml template. Is there a specific reason for this? Couldn't this be standardized to just use one base reviews template that third-party applications can then reference instead of having to do the same thing within our own apps? There's a lot of logic in these templates that could break between versions and this likely could mostly be avoided by just maintaining a single base template for comments and reviews.
Adriano Faria Posted March 8, 2020 Posted March 8, 2020 reviews.phtml especially is hard to do because it can have some special situation. Downloads, for example, there's the Users must download before reviewing? that will have this option in the template: {{elseif $file->mustDownloadBeforeReview()}} <p class='ipsType_reset ipsType_light ipsType_normal'>{lang="no_download_review"}</p> I use in a couple of apps something similar. Unless they make a way to pass as parameters somehow. But I agree about comments. comments.phtml uses a different lang bit (item locked) but that can easily be a parameter.
teraßyte Posted March 8, 2020 Posted March 8, 2020 They can just make it a default template with a code option to change it if you need it to be different. They already do such thing for other templates in the suite already anyway; it's nothing new.
bfarber Posted March 9, 2020 Posted March 9, 2020 I'll make a note of this, but I don't think it's likely to change for 4.5 at this stage.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.