Subscribe to Our Newsletter

x

How to Add a Link to User Names

Use code to link users to their profiles

RebelMouse makes it easy for content creators to build dynamic and engaging communities. Each user can have their own username, permissions, and profile. A user's profile can also be linked to via their username anytime it appears on your site.

There are two ways to add this link:

1. Add the Username as a Link to an <a> Tag

HTML:

<a href="#" id="my_username">PROFILE</a>

JavaScript:

<script type="text/lazy-javascript" priority="10">
var user_data_for_use;
setTimeout(function(){
{{require}}(['settings'], function (settings) {
user_data_for_use=settings;
document.getElementById("my_username").setAttribute("href","/u/"+settings.user_site.name);
});},1000);
</script>

Upon page load, the code above will change the value of the href attribute to href="/u/username_of_user" for any element that uses id="my_username.".

2. Insert the Username as Text Inside a <span> Tag

HTML:

<span id="my_username"></span>

JavaScript:

<script type="text/lazy-javascript" priority="10">
var user_data_for_use;
setTimeout(function(){
{{require}}(['settings'], function (settings) {
user_data_for_use=settings;
document.getElementById("my_username").innerHTML=settings.user_site.name
});},1000);
</script>

Upon page load, the code above will insert the username inside a <span> tag as text by referencing id="my_username."

If you have any questions about this feature, please email support@rebelmouse.com.

NEW! Beta Posts Dashboard: Filtering and Search UI Upgrade

New Filters in Posts Dashboard

We've implemented new filters that allow users to easily find exactly what they need in their posts dashboard. You can now customize your search results by:

  • Creators You Follow
  • Rating
  • Post Status
  • Post Type
  • Period
  • Sections
Here's what the new filter menu looks like:

Easy-to-Use Search Queries

In the same slick user interface, you can also create search queries and combine them with your filtered results:

  • Post Search
  • Creator Search With Ajax Autocomplete
  • Community Search

This is an exciting step forward in enhancing the editorial experience for our users. It should now be much simpler to narrow down results to exactly what you're looking for.

Here's how the workflow looks in action:

If you have any questions about these dashboard updates, please email support@rebelmouse.com.

Subscribe to Our Newsletter