Recent searches


No recent searches

Is their a way to remove one of the content blocks for the forms?

Answered


Posted Aug 15, 2024

We like the content blocks from the homepage of guide however we need to remove one? As we'd like it hidden and give people that need it a direct link to the form instead, in other words we don't want everyone to use it or have access. We can't do this through organisation as it could be anyone?


0

3

3 comments

Hi Katrina

 

I think custom pages are what you need.

Custom pages don't appear in a section or a topic. 

Rather, they have their own URLs that you can use to direct users to the pages.

https://support.zendesk.com/hc/en-us/articles/4409012911770

0


image avatar

Brett Bowser

Zendesk Community Manager

Thanks for sharing this solution Kidam Mun ! Super helpful :) 

0


image avatar

Brandon Tidd

Zendesk LuminaryUser Group LeaderThe Humblident Award - 2021Community Moderator

Hey Katrina,

 

To hide a content block on the homepage of your Zendesk Copenhagen Guide Theme while allowing direct access to a specific form for select users, you can consider the following approaches:

1. User Segmentation with Conditional Logic
  - User Segments: Create a user segment in Zendesk that includes the users who should have access to the form. You can then use conditional logic in the template to display or hide the content block based on whether the user belongs to this segment.
  - Implementation: Modify the HTML or Handlebars templates in the theme to include a conditional statement that checks the user's segment. If the user belongs to the segment, show the content; otherwise, hide it.

  Example:

  {{#if user_segment 'Your_Segment_Name'}}
    <!-- Display content block –- >
  {{/if}}
 

2. jQuery Solution
  - jQuery: You can use jQuery to dynamically hide the content block based on certain conditions, such as the user's role, group, or even a custom user property.
  - Implementation: Add a script to your theme's JavaScript file that checks the condition (like a custom user property or group membership) and hides the content block if the condition is met.


  $(document).ready(function(){
    var userRole = HelpCenter.user.role;
    if (userRole !== 'admin') {
      $('#content-block-id').hide(); // Replace with your content block's ID or class
    }
  });
 

3. Direct Link Access
  - Remove the Content Block: Simply remove the content block from the homepage and provide the form link directly to those who need it via email or another private communication channel.
  - Restricted Access: You can also use the form's URL with a unique query parameter or token that you share only with the selected individuals.

 

Each of these options has its pros and cons, depending on your specific requirements and user management in Zendesk. User segmentation offers a more structured and integrated approach, while jQuery provides flexibility if you need to hide content based on more complex conditions.

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post