US English (US)
BS Bosnian

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Book a Demo
  • Product Updates
  • Contact Us
English (US)
US English (US)
BS Bosnian
  • Home

Template Changes for Subdirectory Setup

Update your Helpjuice templates to support subdirectory-based URLs.

Written by Guilherme Arantes

Updated at May 8th, 2025, by Guilherme Arantes

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
    Users Accessibility New to Helpjuice? Start Here Content Management Multiple Languages/Translations & Localization Multilingual Knowledge Bases Analytics Video Tutorials
  • Customization
    Customization Guides
  • API V2
  • API V3 and Webhooks
  • Article Editor
  • Billing / Subscription
  • Authentication
  • Pricing
  • Swifty AI Chatbot
  • Swifty AI Helpbar
  • What's New
+ More

Table of Contents

Update Internal Links Adjust Form Actions Meta Tags and Canonical URLs Review Custom Scripts Language Switcher Paths Need Help?

When setting up your Helpjuice Knowledge Base to run on a subdirectory (such as /help), some updates are required within your templates to ensure paths and functionality remain intact. This guide outlines the key template changes you may need to make after switching to a subdirectory structure.

Each of the sections below covers a common area where updates may be needed, such as internal links, forms, meta tags, and JavaScript. You don’t need to apply every change listed here - it depends on how your templates were originally built.

It’s important to understand how paths behave differently when your Knowledge Base is no longer at the root of your domain. Adjustments made in the right places will help maintain navigation, indexing, and any logic relying on specific URLs.

Update Internal Links

Links to categories, articles, or search pages that previously used relative or root-level paths should now include the subdirectory. For example:

<a href="/{{ category.url }}">

should become:

<a href="/help/{{ category.url }}">

Review your navigation menus, footers, buttons, and anywhere internal links are manually defined.

Please notice that for links in the same page (starting with #) you don't need to include the path.

Adjust Form Actions

Forms such as search or contact forms often include an action attribute pointing to a root-relative path. Update these to reflect the subdirectory structure. For instance:

<form action="/search">

should become:

<form action="/help/search">

Ensure the action path matches your new structure to avoid submission issues.

Meta Tags and Canonical URLs

If your template includes custom meta tags such as knowledge-base-url or canonical URLs, these should also reflect the subdirectory. These tags should be placed inside the <head> tag within your Main Layout template.

<meta name="knowledge-base-url" content="https://yourdomain.com/help">

Keeping these values up-to-date helps ensure your site is indexed properly and that any scripts depending on full URLs behave as intended.

Review Custom Scripts

Any JavaScript logic that references paths or handles redirects should be reviewed. Look for scripts that use window.location.pathname or hardcoded paths (e.g., /categories) and prepend the subdirectory where needed.

For example:

if (window.location.pathname === "/search") {
  window.location.href = "/help/search";
}

This ensures custom logic continues to work properly after the move to a subdirectory.

Language Switcher Paths

If your site supports multiple languages and uses a language switcher, ensure each language’s base path includes the subdirectory.

You may need to adjust logic that builds these URLs dynamically, making sure /help is part of the final path regardless of selected language.

Need Help?

If you're not sure where to apply these changes — or you'd prefer our team to handle the updates for you — we're here to help. You can submit a customization request and include details about your current setup and the subdirectory you're using.

We'll review your templates and implement the required updates to ensure everything works smoothly with your new structure.

subfolder modifications layout updates

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

Copyright © 2025 - Helpjuice

Helpjuice, Inc. is a registered US Corporation, EIN # 45-2275731

Download W9
  • Help
  • Features
  • Pricing
  • About
  • Careers
  • Customers
  • Blog
  • Case Studies
  • Resources
  • Knowledge Base Examples
  • Privacy Policy
  • Terms of Service

Why is the knowledge base important?

With a knowledge base, you can allow your customers to self-help themselves, thus reducing your customer support by up to 60%. Furthermore, you can also have your team get instant answers to the questions they need without having to email themselves all using knowledge base software.

What is the purpose of a knowledge base?

The purpose of knowledge base software is to allow you to host your knowledge base/corporate wiki in one centralized 'hub'. Both your customers, and employees can now access information within seconds!

Made with from Miami, Bosnia, Morocco & Brasil

+1 (833) 387 3877 support@helpjuice.com
Expand