Hello,
Here is a patch that adds the option to exclude by content type. This solves the problem of having to add nodes manually, as typically a node with dynamic content will be of a special content type.
Hope people find this usefull :)
Comment | File | Size | Author |
---|---|---|---|
#10 | cacheexclude-478790_1.patch | 2.31 KB | eabrand |
#8 | cacheexclude-478790_0.patch | 2.17 KB | eabrand |
#4 | cacheexclude-478790.patch | 2.13 KB | eabrand |
#2 | cacheexclude-478790.patch | 1.97 KB | eabrand |
exclude_content_type.patch | 1.57 KB | Alice Heaton |
Comments
Comment #1
Crell CreditAttribution: Crell commentedFrom a usability standpoint, would it be better to have a separate on/off radio on each node type's form to say whether it should be cached or not? Not sure.
Also, code calls things "node", not "content", so the variable should be cacheexclude_node_types, or something like that.
Comment #2
eabrand CreditAttribution: eabrand commentedHere are the fixes: checkbox instead of select box & changed from "content" to "node"
Comment #3
Crell CreditAttribution: Crell commentedIf I'm reading the patch correctly, this removes the ability to exclude by path. Not cool. :-) We just want to add the additional functionality.
Comment #4
eabrand CreditAttribution: eabrand commentedOh sorry about that. Here you go:
Comment #5
Crell CreditAttribution: Crell commented1) There should be an underscore in the name of the saved variable between the prefix and the node name. It should also be "node_type", not "node".
2) What's with the array('', '') as the default value for the node types to exclude? That makes no sense at all.
3) "Pages to exclude from caching" is the wrong name for the new form element. That's just copying and pasting from the first textarea, and is wrong. Please update it.
4) "Check all that apply" is a useless #description text. It should be something descriptive and informational, explaining what checking a box there actually does.
Comment #6
Crell CreditAttribution: Crell commentedComment #7
Crell CreditAttribution: Crell commentedAlso, make sure all comments have a proper period at the end so that they're a full grammatically correct sentence.
Comment #8
eabrand CreditAttribution: eabrand commentedHere is the updated patch!
Comment #9
Crell CreditAttribution: Crell commentedThe variable_get() calls do not match up, so the variable will never be found.
Comment #10
eabrand CreditAttribution: eabrand commentedHere is a tested patch. The reason for the array is because the checkboxes are stored as an array in the form.
Comment #11
drupert55 CreditAttribution: drupert55 commentedHello.
Is this patch needed in 6.13? I too want to exclude a content type from showing up in Recent Posts, searches, etc.
Thanks.
Comment #12
Crell CreditAttribution: Crell commenteddrupert: What you're describing has nothing to do with this module whatsoever. You need to deal with access control for that. This module is just about caching.
Comment #13
Crell CreditAttribution: Crell commentedCleaned up #10 some. It still had "node" in the UI, and we can strip down the list of types when checking using array_filter(), which is more PHP awesome. :-) Committed the modified version.
Thanks everyone!