Try our conversational search powered by Generative AI!

List all content that use a block in CMS

Vote:
 

I needed to support the customer in a way that he finds untranslated content. So i have asked if it's possible in this thread.

There is no way to list it without using code or the database. So in this case i needed this query to determine all content-ID's which i can use for a link to the CMS.

select c.pkID  from tblContentType ct
inner join tblContent c ON c.fkContentTypeID = ct.pkID
where ct.Name = 'LinkBlock'
order by c.pkID

You can append it to the URL to get a link to the CMS content, for example(649 is the pkID)

https://Domain/Somename/CMS/#context=epi.cms.contentdata:///649

But it would be a great help for the customer if he could get a list of all pages/content of a specific block on himself. A good place would be: Admin/Content-Types/Blockname

You could provide a button "Show content that use the block", if you click it it opens a popup which lists all content as hyperlink.
Even better would be to be able to filter for translated/untranslated content of this block.

#208021
Edited, Oct 10, 2019 18:32
Vote:
 

Maybe this could this be of help? CMS Audit

#208037
Oct 11, 2019 10:26
Tim Schmelter - Oct 11, 2019 10:35
Thank you, looks promising. Just a pity that it seems to need too much resources according to this comment:
https://github.com/nicolaayan/EpiserverCmsAudit/issues/8
We couldn't use a plugin on the live website which affects the performance so much.
That's why i prefer a feature that enables the CMS Editor to look where a specific block is used. I'd assume that it's more efficient.
Maybe this feature should support paging, so that you can decide if you want to search further after say 50 findings.
Vote:
 

I think I think IContentRepository.GetReferencesToContent can help (not sure about block, though, but it should)

#208039
Oct 11, 2019 10:58
Tim Schmelter - Oct 11, 2019 11:01
I'm asking for a feature that supports the CMS Editor. I'm not a plugin developer, so code doesn't help.
It would be great if EPI would provide a way to show the references of a block in the CMS-UI with the possibility to jump there, so as link.
Vote:
 

I have used this sql query now to get the required informations, missing untranslated content and their language:

DECLARE @nameOfBlock VARCHAR(MAX) = 'LinkBlock'
DECLARE @nameOfBlockProperty  VARCHAR(MAX) = 'Reference'
 
SELECT LanguageID, c.pkID
FROM tblLanguageBranch lb
INNER JOIN tblContentLanguage cl ON lb.pkID = cl.fkLanguageBranchID
INNER JOIN tblContent c ON cl.fkContentID = c.pkID
INNER JOIN tblContentType ct ON c.fkContentTypeID = ct.pkID
WHERE ct.Name = @nameOfBlock
AND NOT EXISTS(
    SELECT 1
    FROM tblContentProperty cp
    INNER JOIN tblPropertyDefinition pd ON cp.fkPropertyDefinitionID = pd.pkID
    WHERE pd.Name = @nameOfBlockProperty
    AND pd.fkContentTypeID = ct.pkID
    AND cp.fkLanguageBranchID = lb.pkID
    AND cp.fkContentID = c.pkID
)
ORDER BY pkID, LanguageID

Would be great if the CMS would support it anyway, so that the customer, who is responsible for the content, can do it himself.

#208242
Edited, Oct 18, 2019 10:43
Vote:
 

So, you would want editors to be able to select:

  1. A content type
  2. A property from that content type

And then list all instances of the content type where the property is null or empty.

You could easily create an admin tool for that. However, I have also been in need of the same thing, and have created a tool that (among other things) does this.

#208272
Edited, Oct 18, 2019 15:23
Tim Schmelter - Oct 18, 2019 15:57
I guess it would be best if you had this option in the Admin section.
1.) On the Content-Type site
There you could provide a button "Search referenced content". If you click it it opens a popup where you can select All/translated/untranslated.
If you click a search button it lists the language and the content-path(or something like that). It must be a link, so that you can go to this language-content to see it or to add the missing translation of this block or page.
2) The same button must be at the property page
You could show this button if the checkbox "unique value per language" is checked, otherwise it doesn't make much sense.
Here the logic is basically what my sql query above does(NOT EXISTS for untranslated and EXISTS for translated content).
This thread is locked and should be used for reference only.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.