# Drop-down menu to globally change definition of a function t[x]?

If have a function t[x_] which is used extensively in a long notebook, but which has a variety of definitions, and which is used in a variety of ways. I'm looking for a way to assign my chosen definition across the entire notebook, from a drop-down menu in the first cell.

For example, say I wish to assign t[x_] one of the following definitions:

t[x_]:=ArcTan[x]
t[x_]:=Tanh[x]^k
t[x_]:=Erf[x]/Pi


And say that somewhere further down the notebook, there is a cell that reads:

func[n]=Sum[t[n - c^b], {b, 1, c}]


I want it (indeed, all cells with the function t in them) to change depending on my choice in the notebook's first cell, so that func[n]=Sum[t[n - c^b], {b, 1, c}] then reads one of

func[n]=Sum[ArcTan[n - c^b], {b, 1, c}]
func[n]=Sum[Tanh[n - c^b]^k, {b, 1, c}]
func[n]=Sum[Erf[n - c^b]/Pi, {b, 1, c}]


Note that there are several pages of such cells. I don't want the cells to be evaluated, because a lot of them are just notes of algebraic workings. I just want the cells as written to change in response to the choice I made at the top - and I want it to include changes of variable such as x -> (n - c^b).

Is this possible? How would I do it?

UPDATE:

There are of course lots of cells that contain evaluatable instructions - Table, Plot, etc. I don't want these to evaluate immediately as it could take forever. Presumably, if the content of the cell to be evaluated changes, then the 'result' cell will become greyed out. That's fine because it will indicate to me that the cell awaits evaluation.

I'd put it in DockedCells, though:

ActionMenu["Define f", {
Sin :> (ClearAll[f]; f[x_] := Sin[x]),
Cos :> (ClearAll[f]; f[x_] := Cos[x])}]


E.g.:

SetOptions[EvaluationNotebook[],
DockedCells -> {Cell[
BoxData@MakeBoxes[

• Hi @Michael E2. Thanks for this. It creates the drop-down (and DockedCells is really handy, thank you!), but it still doesn't actually change the entry in the other cells in the notebook from t[x] to (say) Sin[x]... Maybe that's not possible? Aug 9, 2019 at 8:26
• Might a notebook template object be useful to you in this context? (My randomly-generated notebook code predates NotebookTemplate[].) Aug 9, 2019 at 11:28