I think it would be usefull to have a token for node-type-name...

Comments

jaydub’s picture

for 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.

EgonO’s picture

Title: Toke for Note-Type-Name » Token for Node-Type-Name

ok, 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"...

jaydub’s picture

gotcha, will look into making both available

jaydub’s picture

ok 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.

EgonO’s picture

hman readable. at the moment the machine readable is available but the human readable not.

jaydub’s picture

The human readable type is available...It's made lowercase by default but it's there in the [node-type] token

EgonO’s picture

ok, the lowercase dosen't make sense for me... i need a direct token "as is" of the human readable node-type-name...

jaydub’s picture

ok. 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.

EgonO’s picture

ok. sounds good. thanks.

jaydub’s picture

The 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.

jaydub’s picture

Component: Activity Contrib » User interface
jaydub’s picture

Component: User interface » Documentation
Category: feature » task

TODO: Document this new theme function (and all the others for good measure).

jaydub’s picture

Status: Active » Fixed

Theming documentation has been added to the Drupal handbook. Please checkout the handbook page on theming activity: http://drupal.org/node/353445 for details.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.