Getting categories by list of ids

NodeBB Development

Suggested Topics


  • 3 Votes
    2 Posts
    124 Views

    It has certainly improves the first impression of categories page.

  • 0 Votes
    5 Posts
    378 Views

    @pitaj That makes sense.

    Thank you, I think that answers my question.

  • 0 Votes
    3 Posts
    260 Views

    @julian Yup I know. But I want to code new to understand how to do it

  • Categories on Subdomains.

    NodeBB Development
    10
    2 Votes
    10 Posts
    3k Views

    After some playing about, i've settled on a redirect. If anyone wants to do something similar, create a new file in sites-available called subdomains, then do the usual sudo ln -s /etc/nginx/sites-available/subdomains /etc/nginx/sites-enabled

    Inside the subdomains file, create a server block like thus:

    # Mixes server { listen 80; server_name mixes.35hz.co.uk; rewrite ^ $scheme://35hz.co.uk/tags/mix$request_uri? permanent; }

    If you want the subdomain to ignore the request parameter, then remove $request_uri? portion of the rewrite. This basically means that if someone typed mixes.35hz.co.uk/parameter it would ignore /parameter and still go to the relevant tag page without causing a 404. This may be more beneficial. So I'd recommend leaving that portion out. However this would be useful if you wanted a fast way to navigate to a user profile via something like user.35hz.co.uk/a_5mith. Because you could add the request_uri after /user in the rewrite.

    Just add more server blocks as required for each rewrite. You can stack server_names so that multiple subdomains go to the same link, just add another server_name underneath the existing one.

    server_name mixes.35hz.co.uk; server_name mix.35hz.co.uk;
  • 0 Votes
    10 Posts
    4k Views

    Well, no that doesn't work either as it just shows '{category_id}' in the console with no ID #. Rather interesting.