I have added my own customized properties for the pdoCrumbs Snippet, because the default properties are overwritten after an update. My own properties are also highlighted in green, which should actually have precedence over the standard properties.
That's not the case. The Snippet call always uses the default properties, which of course doesn’t show the desired result in the frontend.
Thanks and best regards!
Update:
I can use my custom properties (pdoCrumbs-Modified) directly in the snippet call for sure:
[[pdoCrumbs@pdoCrumbs-Modified]]
But, shouldn’t it be the standard behaviour, that the custom properties overwrite the default properties (provided that the custom properties are highlighted in green)?
[ed. note: mdillgen last edited this post 9 years, 4 months ago.]
There is no way for the snippet to know which custom set to use.
Maybe in future elements will have an option/feature where you pick from the list of sets associated with them in order.
So that if there are three sets, the element would pick the first.
As of now pdoCrumbs does not have that logic privately.
I have a snippet I designed that would take in a set as default properties if the name of the set was of a particular pattern
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
I hate to disagree with DS, but what you're doing should definitely work.
Using @propertySetName in the snippet tag should load the property set last, which would overwrite any default properties that are different in the Property Set.
Be sure you're spelling the Property Set name exactly right (I would remove the hyphen). One likely problem is that it's not enough to create the Property Set and specify it in the tag. The Property set also has to be "attached" to the snippet or plugin like how a TV has to be attached to a Template.
If you create the Property Set on the Properties tab of the snippet, this usually happens automatically, but if you create it in System -> Property Sets, you have to attach it manually by right-clicking on it in the tree at the left. In the Property Sets tree, the attached elements are indented below the name of the Property Set.
I've also had trouble getting Property Sets to be read and sometimes have had to manually delete files in the core/cache directory and flush sessions to get them to work.
Update:
I can use my custom properties (pdoCrumbs-Modified) directly in the snippet call for sure:
[[pdoCrumbs@pdoCrumbs-Modified]]
I thought the OP meant [[pdoCrumbs@pdoCrumbs-Modified]] worked for him?
My own properties are also highlighted in green, which should actually have precedence over the standard properties.
I also thought he meant that he had originally expected this call [[pdoCrumbs]] to automagically use his custom pset
pdoCrumbs-Modified
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
In that case, I probably don't have to disagree with you.
It wouldn't be the first (or last) time I misread a post.
Hi guys,
Thank you very much for helping me out here.
And yes, like @donshakespeare was cutting it down
[[pdoCrumbs@pdoCrumbs-Modified]] worked for me!
Indeed I was expecting pdoCrumbs to automatically will use my custom property set. That's what the description in there says: (…) properties highlighted in green would have precedence over the standard (default) properties!
They will, but only if you specify the property set in the tag. Otherwise, as donshakespeare said, MODX would have no idea which property set to use. In your case, there's only one custom property set, but by leaving it out of the tag, you're telling MODX that you don't want to use it, so the default properties (overridden by any specific properties set in the tag) apply.
FWIW, I almost never use property sets for snippets. Instead, I just put all the properties I want to override in the tag. That way I can see and edit them while editing the resource, rather than having to jump to the snippet or to Property Sets, and I see only the ones I want to set (each on its own line).