cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

How to create a new toolbar toggle button that toggles between Document Map view and Normal view

rmcgarvey
1-Visitor

How to create a new toolbar toggle button that toggles between Document Map view and Normal view

Our editors rely on a handful of toolbar buttons that were removed in Arbortext 7.  I have most of them replaced, but I still need to tweak one of them.

I've been digging through the Arbortext 7 Customizing Guide trying to figure out how to create a new toolbar toggle button that restores the Document Map button that toggles between Document Map view and Normal view.  I haven't found a solution yet and thought someone here might have done this already.  I currently have a button that shows the Document Map view, but in order to duplicate the functionality of the button as it existed in Arbortext 5, it needs to toggle between Document Map and Normal views.  Has anyone done that yet or know how to create such a button?

Here's one of the custom toolbars I assembled with the Document Map button first in the set:

<toolbar id="toolbar_Randy_Views" name="GC Views" x="50" y="25"><?Pub Dtl?>

<button command="ViewDocmap" id="Toolbar_Views_Randy"

image="imageDocumentMap" statustext="Document Map"

tiptext="Document Map"></button>

<button command="SyncOtherPane" id="Toolbar_Views_Randy"

image="imageSyncViews" statustext="Synchronize Views"

tiptext="Synchronize Views"></button>

<button command="WindowSplitLeft" id="Toolbar_Views_Randy"

image="imageLeftRightSplit" statustext="Left-Right Split"

tiptext="Left-Right Split"></button>

<button command="WindowSplitAbove" id="Toolbar_Views_Randy"

image="imageTopBottomSplit" statustext="Top-Bottom Split"

tiptext="Top-Bottom Split"></button>

</toolbar>

ACCEPTED SOLUTION

Accepted Solutions
rdiaz
12-Amethyst
(To:rmcgarvey)

Hi Randall,

Depending on how you want to do it, the commands still exist in the 7.0 stream, in the commands.acl core file.

I found the following:

alias ViewNormal    set -local view=edit

alias ViewDocmap    set -local view=docmap

alias ViewColumnView    set -local view=column

alias ToggleDocmap    toggle_docmap()

alias ViewToggleDocmap    {

  if (option('view')=='docmap') {

    set -local view=edit

  } else {

    set -local view=docmap

  }

So you could just use the toggle, or have separate buttons for the different views if that's perferable.

View solution in original post

2 REPLIES 2
rdiaz
12-Amethyst
(To:rmcgarvey)

Hi Randall,

Depending on how you want to do it, the commands still exist in the 7.0 stream, in the commands.acl core file.

I found the following:

alias ViewNormal    set -local view=edit

alias ViewDocmap    set -local view=docmap

alias ViewColumnView    set -local view=column

alias ToggleDocmap    toggle_docmap()

alias ViewToggleDocmap    {

  if (option('view')=='docmap') {

    set -local view=edit

  } else {

    set -local view=docmap

  }

So you could just use the toggle, or have separate buttons for the different views if that's perferable.

rmcgarvey
1-Visitor
(To:rdiaz)

Thank you, Rafael!  The toggle command works perfectly.  And thanks for the tip about the commands.acl file.  I was finding commands by digging through the menu config files, and the menu doesn't contain the toggle command.  I appreciate your help.

Announcements

Top Tags