In the open source example http://www.telesc.pe/, how do I remove digest and daily view items from the view menu? Do I need to modify telescope-base?
How do I customise telescope-base?
1k Views Asked by gsrivast At
2
There are 2 best solutions below
4

You can try this :
Create a config.js
under client/
and put the following code inside :
while(viewNav.length > 0){
viewNav.pop();
}
viewNav.push({
route: 'posts_top',
label: 'Top'
});
// etc...
This will load after telescope-base
which is responsible for exporting viewNav
an array used to control which items are inserted in the menu.
You need to create a new package to hold your customizations. You can look at the Telescope documentation, look at existing theme packages such as
base
andhubble
, or copy and adapt thetelescope-blank
package.Once you have your new package, you can simply overwrite the
viewNav
menu. For example:The daily view is provided by another package,
telescope-daily
, so you'll need to remove it from the app if you don't want to use it:(Note that the digest view will also be extracted out as its own package eventually, but right now it's still part of the core)