Skip to main content
ChadPink
Inspiring
April 6, 2021
Question

Remove Multiple Stylesheets Associated with Topics

  • April 6, 2021
  • 3 replies
  • 516 views

Not really sure how the multiple stylesheets got assigned to most topics, but they need to be removed across the project.

 

Is there a way to do that without having to open each indivicual topic and deleting the incorrect stylesheet?

Also, I noticed that even if the stylesheet has been removed from the topic and saved, when I close and re-open the project, the stylesheets are back again.

 

Any thoughts how this can be resolved?

    This topic has been closed for replies.

    3 replies

    Community Expert
    February 14, 2024

    I'm not sure if this helps, but if you go in to the Topic List report, select a bunch of topics then right-click and select Properties, the Stylesheets section will show stylesheets that are common to all the selected topics. You should then be able to delete from all at once. 

     

    Do note that it only shows stylesheets that have been applied to ALL the topics selected though.

     

    (Also, I could only test this on RH2019 New UI right now, so maybe it changed in RH2020 or RH2022...)

    bronxguys02
    Known Participant
    February 15, 2024

    Thanks for the note! Otherwise, I would have assumed they were all correct already. And it worked perfectly in RH2020.

    "Do note that it only shows stylesheets that have been applied to ALL the topics selected though."

    ChadPink
    ChadPinkAuthor
    Inspiring
    April 6, 2021

    I will try this and will let you know! Thank you so much!

    Peter Grainge
    Community Expert
    Community Expert
    April 6, 2021

    You will need to use Find and Replace.

     

    Open a topic and find the CSS references in Source View. Locate one of the CSS files you want to remove. It will be something like the line below.

     

    <link rel="stylesheet" type="text/css" href="../assets/css/filename.css" />

     

    Enter that in the Find and leave Replace blank.

     

    In the Find and Replace Settings make sure that Find in Source View is selected.

     

    Make sure you have a backup before you start.

     

    I would deselect the two backup options as that will create loads of files that you don't need if you create the backup.

    ________________________________________________________
    See www.grainge.org for free Authoring and RoboHelp Information

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.
    bronxguys02
    Known Participant
    February 14, 2024

    Do I enter the entire line in the Find field? I got an error that the string could not be found.

    <link rel="stylesheet" type="text/css" href="../assets/css/filename.css" />

    Thank you.

    Peter Grainge
    Community Expert
    Community Expert
    February 14, 2024

    @bronxguys02 I'll assume you changed filename to whatever. 🙂

     

    Compare that string with one of the topics that has the filename to be removed.

     

    Update.

    You could also select all the topics in a folder, right click and select Properties. That will show you topics with multiple CSS and you can delete from there.

    Only one CSS will be shown initially but the down arrowhead lets you change that. Then you can delete.

     

    ________________________________________________________

    My site www.grainge.org includes many free Authoring and RoboHelp resources that may be of help.

     

    Use menu (bottom right) to mark as Best Answer or to Highlight particularly useful replies. Found the answer elsewhere? Share it here.