I believe there are widgets for each of those!
However, I'd implore you to consider information density- Most users are scared off by even too many categories- putting all that on the landing page will bounce a lot of users!
Hi,
I'm trying to add an item to the navigation system if the user has a value set against their profile, but I'm not sure how to access the current users ID within the addNavigation hook
plugin.addNavigation = function(header, callback) {
User = module.parent.require('./user');
User.getUserField(<<CURRENT USER ID SHOULD GO HERE>>, 'gold_member', function(value) {
if(value){
header.navigation.push({
class: "",
iconClass: 'fa fa-fw ' + 'fa-plus',
"name": "hello",
"text": "Add Forum",
"title": "hello world",
route: "/new_category"
});
}
callback(null, header);
});
} ```
any ideas?
Cheers,
M
Added uid into the data passed to the hook, you can get it with header.uid
https://github.com/NodeBB/NodeBB/commit/0847eb2c3de0c03917178980f3afef8cb43a3ae4#diff-d41d8cd98f00b204e9800998ecf8427e
Keep in mind it will be 0 for users that are not logged in.
@baris Fantastic. Thanks!