I am having a very difficult time trying to find out how to either disable the display of SmartDocs content, or (as an alternative) changing its URL.
Right now, going to "/api" displays SmartDocs content. I have a custom module with a _menu hook that I want to use to display content at the same URL.
How can I update Drupal such that going to "/api" displays the content delivered by the custom module and not SmartDocs?
Solved! Go to Solution.
This is what worked for me:
Change Main Menu
Go to: /admin/structure/menu/manage/main-menu
1. Click to edit the "Menu link" that points to SmartDocs page
2. Change the "Path" value from one that points to a taxonomy to your new path.
Change Taxonomy Alias
Go to: /admin/structure/taxonomy/smartdocs_models
1. Click to edit the list item whose name matches your api model
2. In the "URL path settings", clear the "URL alias" value
You can turn off the SmartDocs module by:
This will keep the content you already created in place but make the /api url open for you to use. If you want to delete SmartDocs completely follow the steps above, then:
Hi,
Try disabling the SmartDocs module and enable your custom module.
and @Sonali
Disabling the SmartDocs module was actually the first thing I tried. When I do that and then go to "/api", it displays the "displayName" and "description" from the json and the text:
There is currently no content classified with this term.
I know this has something to do with taxonomies but not sure what.
Hello @williamking, can you follow the full set of instructions to remove SmartDocs completely? I did give steps using the latest cloud release.
I was hesitant to do so because I was not 100% sure the change would not propagate out into all environments (dev, test, prod). I don't won't it deleted and unavailable in the live environments while I test this.
Also, it would obviously be easier for me to ditch what I'm doing and go back to the current SmartDocs. Just looking at the number of steps required to delete makes me think to restore is going to be challenging.
Do you have any ideas or other possibilities before I resort to a delete?
Does it matter that I've "unpublished" the SmartDocs nodes? Where is it defined that "/api" is the SmartDocs path? Can I just change that to "/apiOLD" somewhere?
This is what worked for me:
Change Main Menu
Go to: /admin/structure/menu/manage/main-menu
1. Click to edit the "Menu link" that points to SmartDocs page
2. Change the "Path" value from one that points to a taxonomy to your new path.
Change Taxonomy Alias
Go to: /admin/structure/taxonomy/smartdocs_models
1. Click to edit the list item whose name matches your api model
2. In the "URL path settings", clear the "URL alias" value
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |