Closed (fixed)
Project:
Activity
Version:
5.x-4.x-dev
Component:
Documentation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
23 Oct 2008 at 17:26 UTC
Updated:
16 Jan 2009 at 10:40 UTC
I think it would be usefull to have a token for node-type-name...
Comments
Comment #1
jaydub commentedfor any particular activity contrib module or in general? Most if not all of the activity contrib modules do have a token available for the node type if there is a node in context.
Comment #2
EgonO commentedok, i'm talking about the nodeactivity module specially and there the NAME not the type... you know, the name one gives a content-type, not the machine-readable "type"...
Comment #3
jaydub commentedgotcha, will look into making both available
Comment #4
jaydub commentedok still a bit confused. You want access to the machine-readable type or the human readable type? The human readable type should already be available.
Comment #5
EgonO commentedhman readable. at the moment the machine readable is available but the human readable not.
Comment #6
jaydub commentedThe human readable type is available...It's made lowercase by default but it's there in the [node-type] token
Comment #7
EgonO commentedok, the lowercase dosen't make sense for me... i need a direct token "as is" of the human readable node-type-name...
Comment #8
jaydub commentedok. I think the original idea was that since the activity records are in the form of a phrase/sentence that it made sense to lowercase the node type name since 'Bob added a new Blog Post called Foo' would be a bit weird compared to 'Bob added a new blog post called Foo'.
I think I'll change things to only set the machine name for the node type and in the token values section I'll wrap the token in a theme function to allow developers to leave as admin name, set as human readable with lowercasing as is the current behaviour or let a theme override take control.
Comment #9
EgonO commentedok. sounds good. thanks.
Comment #10
jaydub commentedThe latest snapshot dated (should be dated 10/30) changes the tokens stored from the human readable lowercase version of the machine node type name to just the machine node type name. On activity display the [node-type] token now pulls its value from a theme function theme_activity_node_type(). By default this theme function will return the same as the previous behavior which is the human readable lowercase node type name but you can override this theme function to return what you want based on the raw value which is the machine name for the node type.
Please test on new activity records as records created previously will not have the machine name stored.
Comment #11
jaydub commentedComment #12
jaydub commentedTODO: Document this new theme function (and all the others for good measure).
Comment #13
jaydub commentedTheming documentation has been added to the Drupal handbook. Please checkout the handbook page on theming activity: http://drupal.org/node/353445 for details.