Skip to content

Conversation

sneridagh
Copy link
Member

…ould not be linked in teasers and listings.

@sneridagh sneridagh requested a review from davisagli September 25, 2025 14:19
Copy link
Member

@davisagli davisagli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sneridagh Uh, but it doesn't actually do anything? How are you planning to wire it up to the frontend?

@sneridagh
Copy link
Member Author

@davisagli It should be in VLT, right? I still haven't time to do it.

@davisagli
Copy link
Member

davisagli commented Sep 26, 2025

@sneridagh Yes, but how? Is it possible to use an approach similar to the ttw blocks config and inject it into a Volto config setting? Because that would help avoid creating a backwards dependency where VLT is looking for a backend setting that is only defined in kitconcept.core.

I'm also not convinced we have the correct goal here yet. Disabling the links everywhere for everyone makes it harder for editors to get to the content to edit it.

@sneridagh
Copy link
Member Author

@davisagli I would go to the Listing components and the teaser body, where you put the hideLink and add:

import { useSelector } from 'react-redux';
import type { GetSiteResponse } from '@plone/types';

type FormState = {
  site: { data: GetSiteResponse };
};

// ...
  const site = useSelector<FormState, GetSiteResponse>(
    (state) => state.site.data,
  );
  const typesNotLinked = site['kitconcept.types_not_linked'] || [];
const showLink = (!Summary.hideLink || typesNotLinked.includes(item['@type'])) && !isEditMode;

do you think this is wrong or not feasible? Let's talk about this today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants