# Macro to link stack pages

**URL:** <https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574>\
**Category:** RapidWeaver Classic\
**Created:** [June 7, 2018, 4:22pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574 "2018-06-07T16:22:15Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![TechBill](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TechBill](https://forums.realmacsoftware.com/u/TechBill)\
**Post date:** [June 7, 2018, 4:22pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/1 "2018-06-07T16:22:15Z")

</div>

I need to manually add a link in SVG to link other stack pages in RW.

Does the stack page have it own hyperlink macro that I can use to manually add in SVG?

Thank you

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [June 7, 2018, 7:10pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/2 "2018-06-07T19:10:10Z")

</div>

There are a couple of older posts that may help??

> [@RWThemeKit % Code For Page URL](http://forums.realmacsoftware.com/t/rwthemekit-code-for-page-url/12522):
>
> I don’t actually do (commercial) RW Theme Design, but I do tweak a fair amount in my own theme files for my website work. It would be handy to be able to have a RW “%” tag (like %site\_title%) that output the path to the current page. This would be VERY handy for use in things like Open Graph tags in the HEAD of a document, so I don’t need to create them individually for each page.

and

> [@Web address URL macro?](http://forums.realmacsoftware.com/t/web-address-url-macro/20163/2):
>
> I think what your looking for is: %base\_url%

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [June 7, 2018, 7:11pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/3 "2018-06-07T19:11:09Z")

</div>

Also, Isaiah is pretty quick to respond on his slack, if you want to try him there (I don’t know if this would be a stacks thing or a RW thing though)  
[https://yourhead.slack.com/](https://yourhead.slack.com/)

---

<div class="post-metadata">

**Author:** ![TechBill](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TechBill](https://forums.realmacsoftware.com/u/TechBill)\
**Post date:** [June 7, 2018, 7:16pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/4 "2018-06-07T19:16:21Z")

</div>

If I have an index in europe folder, I type in %base\_url%/europe/ ?

---

<div class="post-metadata">

**Author:** ![TechBill](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TechBill](https://forums.realmacsoftware.com/u/TechBill)\
**Post date:** [June 7, 2018, 7:20pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/5 "2018-06-07T19:20:43Z")

</div>

%base\_url% worked but there was a layers of folder before the /europe/ that was not added to refer

---

<div class="post-metadata">

**Author:** ![jabostick](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/jabostick/32/1760_2.png) [@jabostick](https://forums.realmacsoftware.com/u/jabostick)\
**Post date:** [June 7, 2018, 7:22pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/6 "2018-06-07T19:22:11Z")

</div>

Oh, I’m only able to point people to existing stuff, I can’t _actually answer questions_ and give useful info haha.

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [June 7, 2018, 7:35pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/7 "2018-06-07T19:35:58Z")

</div>

> [@TechBill](#):
>
> %base\_url% worked but there was a layers of folder before the /europe/ that was not added to refer

That should have worked. How are you entering that(HTML stack)?

You can also check out this from Stacks:

> **[GitHub - yourhead/PathsTestStack: A stack that demonstrates many Stacks API...](https://github.com/yourhead/PathsTestStack)**
>
> A stack that demonstrates many Stacks API Path templates. - GitHub - yourhead/PathsTestStack: A stack that demonstrates many Stacks API Path templates.

---

<div class="post-metadata">

**Author:** ![TechBill](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TechBill](https://forums.realmacsoftware.com/u/TechBill)\
**Post date:** [June 7, 2018, 7:40pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/8 "2018-06-07T19:40:30Z")

</div>

The page was located at URL/preview/regions/europe/

%base\_url% took it to URL/europe/

---

<div class="post-metadata">

**Author:** ![teefers](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/teefers/32/8173_2.png) [@teefers](https://forums.realmacsoftware.com/u/teefers)\
**Post date:** [June 7, 2018, 7:53pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/9 "2018-06-07T19:53:42Z")

</div>

%base\_url% should give you what you have as the _Web Address_ in settings:

 ![2018-06-07_12-48-51](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/d/d98a64ca0d95127d14021d75ce63d0f65d9756ef.png)

The link above to PathsTestStacks gives you other variables but you would have to code them within a custom stack.

---

<div class="post-metadata">

**Author:** ![TechBill](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@TechBill](https://forums.realmacsoftware.com/u/TechBill)\
**Post date:** [June 7, 2018, 8:04pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/10 "2018-06-07T20:04:24Z")

</div>

Yes, and all the pages are in a subfolder /regions/

 ![09%20PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/0/0e9d423eb9b15c4dde73b5c645ba198c780132d9.png) ![19%20PM](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/4/4f18c7f84c2dcc61a036f474b66a100b5e7fa18d.png)

The macro is not adding the subfolder to the path. I could just move it all out of the subfolder into the root doc folder. I might just do that

---

<div class="post-metadata">

**Author:** ![juebai](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/juebai/32/2332_2.png) [@juebai](https://forums.realmacsoftware.com/u/juebai)\
**Post date:** [June 8, 2018, 9:05am UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/11 "2018-06-08T09:05:58Z")

</div>

@teefers Doug, thanks for the tip. Just learned about that PATH utility from you 😀

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/system/32/25301_2.png) [@system](https://forums.realmacsoftware.com/u/system)\
**Post date:** [July 8, 2018, 7:05pm UTC](https://forums.realmacsoftware.com/t/macro-to-link-stack-pages/20574/12 "2018-07-08T19:05:58Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
