Sonya* Posted November 14, 2019 Posted November 14, 2019 There was a thread saying we should not copy large part of the IPS core code. I agree, I do not like to copy something that already exists. I have asked several times before but have not get any answer. That's why I try again here. Is there any default templates we can use to output to the frontend: category nodes to browse through content items to browse through content item including moderation functions, report, follow buttons and so on. comments for the content item reviews for the content item I just need Yes/No answer for each list item above. And if Yes then what template to use. If No, then it would mean I have to copy large part of IPS code as I do not want to reinvent the wheel creating my own output. I would copy e. g. cms database templates in this case.
bfarber Posted November 14, 2019 Posted November 14, 2019 By and large, we did not want to take the approach that every single app is the same as every other app just with a different name, so to that end we intentionally use different templates/output patterns for different areas. 2 hours ago, Sonya* said: category nodes to browse through No 2 hours ago, Sonya* said: content items to browse through If you use the content table helper, it can output rows of content items generically. 2 hours ago, Sonya* said: content item including moderation functions, report, follow buttons and so on. No - as a general rule content items should have distinct output that varies, so a generic output method isn't generally desirable. 2 hours ago, Sonya* said: comments for the content item reviews for the content item The comment/commentContainer and review/reviewContainer templates in core / front / global can be used for any content item classes.
Sonya* Posted November 14, 2019 Author Posted November 14, 2019 You have default templates for databases. The point to start with. Databases can be very different. But we have this default there, that we can adapt for our needs. That's why I thought there could be some generic templates for apps too. 😉
bfarber Posted November 15, 2019 Posted November 15, 2019 20 hours ago, Sonya* said: You have default templates for databases. The point to start with. Databases can be very different. But we have this default there, that we can adapt for our needs. That's why I thought there could be some generic templates for apps too. 😉 That's a different scenario...without some sort of default, databases wouldn't work. You would be forced to code some sort of template to see anything, which isn't exactly ideal. But, it wouldn't make sense for us to build, test and maintain "default templates" in our software that work for any content item but are not in fact used by anything out of the box. Everything we build generally has some sort of use internally - we don't generally build something with the idea "we don't need this but maybe possibly someone else will". We have to dedicate our available time to things that are truly used by a majority of our clients.
Sonya* Posted November 17, 2019 Author Posted November 17, 2019 @bfarber, you are right and have misunderstood my question. It was NOT a request to create default templates. It was just a question whether the default templates exist. I just do not want to reinvent the wheel. That's it. I can see your point though. There are tons of core extensions that have to be considered while building default templates. So it is probably not helpful to create such a template with tons of IFs.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.