Page 1 of 1

entry_properties not available without plugin?

Posted: Mon Feb 02, 2015 5:44 pm
by Don Chambers
This might be hard to explain without providing an actual template, but I will try... :wink:

I'm working on a new theme that has template-specific entry properties. These properties can typically be emitted as {$entry.properties.my_property}.

So, I have a custom entries.tpl. With the extended properties for entries plugin, my entry property prints in any $view, ie detailed entry view, startpage, etc.. However, without the plugin installed, the $entries array does not contain any extended properties for any view other than a detailed entry view. I have not tried this in anything other than s9y 2.0.

I was under the impression that using theme specific entry properties did not require the extended properties plugin. Is this not true?

I can test suggestions, but the theme isn't far enough along to share just yet.

Re: entry_properties not available without plugin?

Posted: Mon Feb 02, 2015 6:10 pm
by yellowled
Don Chambers wrote:I was under the impression that using theme specific entry properties did not require the extended properties plugin. Is this not true?
I would assume (although I have never tried it) that without the plugin installed, the theme does not have any extended properties because that's what the plugin adds to entries (among other things) …?

YL

Re: entry_properties not available without plugin?

Posted: Mon Feb 02, 2015 8:11 pm
by Don Chambers
Those properties are available when viewing a detailed entry, but nowhere else.

The whole concept of theme properties was Introduced by Garvin several years ago. I believe it is supposed to work without the need for using the extended properties plugin.

Re: entry_properties not available without plugin?

Posted: Tue Feb 03, 2015 2:32 pm
by garvinhicking
Hey,

the plugin indeed is required to parse and properly offer entryproperties to an entry, yes. The core only fetches it on a s pecific place where it would have cost too much performance to handle it in a plugin, that's why some properties get read in a single entry. But for multiple entries, the plugin takes care of fetching and parsing that data.

Regards,
Garvin

Re: entry_properties not available without plugin?

Posted: Tue Feb 03, 2015 2:57 pm
by Don Chambers
Thanks for the clarification Garvin. So, no chance of retrieving entry properties without the plugin for theme-specific properties? Extended Properties plugin has numerous other features. I thought the idea for theme properties was less overhead if you only needed a field or two, rather than use the whole plugin.

Re: entry_properties not available without plugin?

Posted: Tue Feb 03, 2015 3:14 pm
by garvinhicking
Hi!

Yeah, not really. Fetching entryproperties is one of the things that dearly cost performance and thus need to be disable-able. If it's already in a plugin, creating a core-functionality and having a config option to remove that functionality is really more of a brainfart. Your template can emit a message ilke "Needs the entryproperties plugin to work", and you can check with PHP/Smarty-Code if that plugin exists...

However, with the documentation you mentioned, the template is more or less rebuilding the entryproperties plugin, so it "only" would need more API hooks to perform fetching the properties in the overview. However that is so much overhead that it's not really recommendable, and the entryproperties plugin should be used for that...

HTH,
Garvin