Show another page contents on current page
Asked by Jamil Rahimov:

There are 2 pages

**1.Current Account** (**Current Account** page contains 2 tabs **Tariff** and **Procedure.**)

![Current Account.PNG](/t5/image/serverpage/image-id/74056i6E70F4074E0859EA/image-size/large?v=v2&px=999 "Current Account.PNG")

**2.Tariff**.

![Tariff1.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/74065i600951552610E717/image-size/large?v=v2&px=999 "Tariff1.PNG")  
If I clicked **tariff tab** on **Current Account Page** I need indicate **Tariff page contents** .  

**I used macro but I need help for modify this:**

## Macro title: My Macro  
## Macro has a body: Y or N  
## Body processing: Selected body processing option  
## Output: Selected output option  
##  
## Developed by: My Name  
## Date created: dd/mm/yyyy  
## Installed by: My Name

## This is an example macro  
## [@Param](/t5/user/viewprofilepage/user-id/1345631) Name:title=Name\|type=string\|required=true\|desc=Your name  
## [@Param](/t5/user/viewprofilepage/user-id/1345631) Colour:title=Favourite Colour\|type=enum\|enumValues=red,green,blue\|default=red\|desc=Choose your favourite colour  
\<div class="aui-tabs horizontal-tabs"\>  
\<ul class="tabs-menu"\>  
\<li class="menu-item active-tab"\>  
\<a href="#tabs-example-first"\>\<strong\>Tariff\</strong\>\</a\>  
\</li\>  
\<li class="menu-item"\>  
\<a href="#tabs-example-second"\>\<strong\>Procedure\</strong\>\</a\>  
\</li\>  
\</ul\>  
\<div class="tabs-pane active-pane" id="tabs-example-first"\>  
\<h2\>This is Tariff Tab\</h2\>  
\<p\>Current account tariff\</p\>  
\</div\>  
\<div class="tabs-pane" id="tabs-example-second"\>  
\<h2\>This is Procedure tab\</h2\>  
\<p\>Current account procedure\</p\>  
\</div\>  
\</div\>\<!-- // .aui-tabs --\>


Answers:
author: Dominic Lagger
body: Hi [@Jamil Rahimov](/t5/user/viewprofilepage/user-id/1305037)

If I understand you correctly, you want to show content from "Tab A" in "Tab B"?

There are 2 macros out of the box from confluence:

* [Include Page Macro](https://confluence.atlassian.com/doc/include-page-macro-139514.html)
* [Excerpt Macro](https://confluence.atlassian.com/doc/excerpt-macro-148062.html)

Can you use one of them to fullfill your need?

If not, please try to explain your need in more detail, so I can help you out.

Regards, Dominic

comments: author: Jamil Rahimov
body: [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)   
No.  
I want show another page contents on current page.  
For ex:  
Let suppose current page is A  
If user clicked to TAB B, I need show page B contents on current page A.  
If user clicked to TAB C, I need show page C contents on current page A.


author: Dominic Lagger
body: Okay, so the "Tab thing" is your own user macro?

Then, the Include Page Macro should work for you. In your user macro with the tabs, you could just paste the "storage format" code from the "Include Page Macro". Something like this:

```
## Macro title: My Macro
## Macro has a body: Y or N
## Body processing: Selected body processing option
## Output: Selected output option
##
## Developed by: My Name
## Date created: dd/mm/yyyy
## Installed by: My Name

## This is an example macro
## @Param Name:title=Name|type=string|required=true|desc=Your name
## @Param Colour:title=Favourite Colour|type=enum|enumValues=red,green,blue|default=red|desc=Choose your favourite colour
<div class="aui-tabs horizontal-tabs">
 <ul class="tabs-menu">
  <li class="menu-item active-tab">
    <a href="#tabs-example-first"><strong>Tariff</strong></a>
  </li>
  <li class="menu-item">
   <a href="#tabs-example-second"><strong>Procedure</strong></a>
  </li>
 </ul>

 <div class="tabs-pane active-pane" id="tabs-example-first">
  <h2>This is Tariff Tab</h2>
  <p>Current account tariff</p> 
  // ADD THE INCLUDE PAGE MACRO HERE
 </div>
 <div class="tabs-pane" id="tabs-example-second">
  <h2>This is Procedure tab</h2>
  <p>Current account procedure</p>
 // ADD THE INCLUDE PAGE MACRO HERE
 </div>
</div><!-- // .aui-tabs -->
```

The page macro in storage view format looks like this:

```
<ac:structured-macro ac:name="include" ac:schema-version="1" ac:macro-id="ee16c82d-0228-4acd-b62a-cd1045ee544e"><ac:parameter ac:name=""><ac:link><ri:page ri:content-title="PAGE TITLE" /></ac:link></ac:parameter></ac:structured-macro>
```

Perhaps this helps. Let me know, if this was your request.


author: Jamil Rahimov
body: [@Dominic Lagger](/t5/user/viewprofilepage/user-id/601600)   
Thanks a lot!  
It worked!


Tags: confluence-server

server