pods-framework / pods

The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
https://pods.io/
GNU General Public License v2.0
1.07k stars 264 forks source link

Enhancement: Allow Pods Templates to call other Pods Templates like a Shortcode or Include #3395

Closed PodsBot closed 6 years ago

PodsBot commented 8 years ago

Enhancement: Allow Pods Templates to call other Pods Templates like a Shortcode but safer submitted via Slack by jimtrue

jimtrue commented 8 years ago

this would be like an 'include template' but hopefully with a little bit more control, like passing the pod and orderby, etc.

Shelob9 commented 8 years ago

Also worth seeing https://github.com/pods-framework/pods-code-library/blob/master/example/misc/examples/shortcodes-in-templates.php and https://github.com/pods-framework/pods-code-library/blob/56828e7dcc8715eafcd5f370d8232ec913c191e6/example/misc/examples/shortcode-in-template.php

Both could be lead to unsafe execution, but some conditional logic could create a whitelist

jimtrue commented 8 years ago

Remember @Shelob9 people don't want to code. The above implies 'coding'

Shelob9 commented 8 years ago

OK, but one of those is one line of code they can copypaste. Not sure I have enough empathy for this situation to suggest a whole UI.

jimtrue commented 8 years ago

Take a look at my recommendation above. Mine is more of 'allow basically the functionality of calling another shortcode within a template' type of solution. That would be more useful, ie sending parameters like sort or filtering or where clauses directly within a template. Recall, this is for the user, not for the Developer.

There are multiple situations where not being able to touch the code at all, makes this a very useful capability.