Page Index Macro

The Page Index macro creates a hyperlinked alphabetical index of all page titles within the current space.

The top section of the index contains a cell for each letter of the alphabet, with cells for numbers and symbols. Each cell indicates how many pages are in the corresponding list.

The lower section contains lists of page titles followed by the first few sentences of content on that page.

Each letter, number or symbol in the top section is hyperlinked to the corresponding cell in the lower section. Each page title in the lower section is hyperlinked to the page in the space.

Screenshot: Page Index macro (partial view)


Using the Page Index macro

To add the Page Index macro to a page:

  1. In the Confluence editor, choose Insert > Other Macros
  2. Find and select the required macro

Speeding up macro entry with autocomplete: Type { and the beginning of the macro name, to see a list of suggested macros. Details are in Autocomplete for links, files, macros and mentions.

To edit an existing macro: Click the macro placeholder and choose Edit. A macro dialog window will open, where you can edit the parameters of the macro.

This macro accepts no parameters.

Code examples

The following examples are provided for advanced users who want to inspect or edit the underlying markup for a Confluence page. 

Macro name: index

Macro body: None.

Parameters: None.

Storage format example

Wiki markup example

Was this helpful?

Thanks for your feedback!

17 Archived comments

  1. User avatar

    Anonymous

    Is there a possibility of adding an


    macro which indexes just those pages which are "children" to the page in which the macro is added

    15 May 2009
    1. User avatar

      Arie Murdianto

      I am sorry, it seems that there is no such feature available in Confluence. You may want to raise a new feature request regarding your query to

      Cheers,

      20 May 2009
    1. User avatar

      Anonymous

      Did you add this as a feature request? I would personally like to see this functionality too!

      16 Jul 2009
      1. User avatar

        Mark Hrynczak [Atlassian]

        This seems to be a similar feature request. You can vote/comment on that with your suggestions.

        Cheers,
        Mark

        21 Jul 2009
  2. User avatar

    Michael Vescovo

    why does it say "!@#$" in the last field? is there anyway to get rid of it?

    21 Jul 2009
    1. User avatar

      Mark Hrynczak [Atlassian]

      Any page titles beginning with a symbol such as '@', '$', etc will appear in that field. There is no way to hide it as far as I know - you could raise it as an improvement request at http://jira.atlassian.com.

      Cheers,
      Mark

      21 Jul 2009
  3. User avatar

    catherine_davis@CSGSYSTEMS.COM

    Any way to control the column widths on the space index - I'm also using the tree navigation on the left and it's very narrow - while the column in the index are wide.

    Thanks!

    21 Jul 2009
    1. User avatar

      Sashidaran Jayaraman [Atlassian]

      Hi Catherine,

      As far as I know there is no direct way to do this. I have tried to accomplish this by the use of a simple user macro. The following steps will help you to create the user macro:

      1. Go to Dashboard > Administration > User Macros
      2. Click Create a User Macro.
      3. Name your user macro anything that you want. eg: reduce
      4. Tick "Macro has a body" and Convert Macro body wiki markup to HTML
      5. Change Output to "Macro generates HTML markup"
      6. In the Template, copy and paste the following:
      7. Once you are done with that, you can use this macro to surround the {index} macro like the following:

      By specifying this, the {index} macro will only take 30% of the space that it usually takes.
      Feel free to edit the user macro to suit your requirements.

      Hope this helps.

      Cheers
      JSashi

      28 Jul 2009
  4. User avatar

    Yulia Egorova

    Hi! Does it work only for English alphabet? I tryed it, but seems pages with russian titles arn't included in any section.

    28 Jul 2009
    1. User avatar

      Sashidaran Jayaraman [Atlassian]

      Hi Yulia,

      Yes, currently it only fully supports English alphabets, numbers as well as symbols. While testing this feature, I also tried some umlaut characters in the page title and it manages to index it if the umlaut character is in between some English alphabets. I have tried the same with Russian text, but failed.

      I would suggest you to raise an improvement request at http://jira.atlassian.com. Once you have done that, please add yourself as a watcher, vote for this feature and add your own comments to this feature request. For further details on how we include new features and improvements, you might want to read this page

      Cheers
      JSashi

      11 Aug 2009
  5. User avatar

    Georgina Lewis

    I'm imagining the answer is no given the lack of parameters this macro accepts but is there a way to alter the styling of the table display?

    Particularly, is it possible to have a single column display for the links rather than the default 2 column? I'm referring to the section of the table where individual links are listed with some accompanying text, not the top part with the individual letters of the alphabet.

    Additionally, is there a way of specifying the amount of text (number of words?) that are listed with each link. In the case of indexes with numerous entries the default setting can add up to a dizzying amount of text displayed on a page.

    many thanks.

    18 Aug 2009
    1. User avatar

      Brett Ryan

      Hi Georgina, fir the first part of your question you can partially style the content using the spaces style-sheet and the div macro from the Content Formatting Macros. With this I use the following for mine:

      For the second part, the index macro really should obey the excerpt macro, but it doesn't, I've just created an issue for it, please vote on it if this would suit your needs.

      17 Dec 2010
  6. User avatar

    Sreeharsha Dasa

    Catherine,

    You can try creating 2 column sections to control the overall width used by this macro and the tree navigation

    28 Jul 2010
  7. User avatar

    Anonymous

    I dont want the first few sentences of the page to be displayed. I just want the page names in the index. Is there a way we can remove that part?

    31 Dec 2013
    1. User avatar

      Rachel Robins [Atlassian Tech Writer]

      Sorry, this macro has no parameters, so it is not possible to turn off the page excerpts. 

      01 Jan 2014
      1. User avatar

        Lis Riba

        Can that be submitted as an enhancement request?

        It would also be nice to have a spacekey parameter to create an index for a different space.

         

         

        13 Mar 2015
        1. User avatar

          Rachel Robins [Atlassian Tech Writer]

          Of course, you can make suggestions by raising an issue in our issue tracker. 

          15 Mar 2015
Powered by Confluence and Scroll Viewport