# Total CMS Macro URL

**URL:** <https://forums.realmacsoftware.com/t/total-cms-macro-url/27131>\
**Category:** RapidWeaver Classic\
**Created:** [June 4, 2019, 12:05pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131 "2019-06-04T12:05:09Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![labanbrown](https://avatars.discourse-cdn.com/v4/letter/l/9fc348/32.png) [@labanbrown](https://forums.realmacsoftware.com/u/labanbrown)\
**Post date:** [June 4, 2019, 12:05pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/1 "2019-06-04T12:05:09Z")

</div>

Hello

I’m looking to use a Total CMS macro to create a URL. Seems whenever I do that it puts

before and after the address.

Does anyone know a way around this?

Cheers!

---

<div class="post-metadata">

**Author:** ![joeworkman](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/joeworkman/32/23780_2.png) [@joeworkman](https://forums.realmacsoftware.com/u/joeworkman)\
**Post date:** [June 4, 2019, 1:58pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/2 "2019-06-04T13:58:37Z")

</div>

Do you want Total CMS to only provide part of the URL or the entire thing?

For the entire thing just use a macro and save the full URL into the CMS:

```auto
%cmsData(cmdid)% 

```

If you want part of the URL, save that bit into the CMS

```auto
https://example.com/folder/%cmsData(cmdid)%/anotherfolder/

```

---

<div class="post-metadata">

**Author:** ![labanbrown](https://avatars.discourse-cdn.com/v4/letter/l/9fc348/32.png) [@labanbrown](https://forums.realmacsoftware.com/u/labanbrown)\
**Post date:** [June 4, 2019, 2:32pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/3 "2019-06-04T14:32:29Z")

</div>

Hi Joe

Sounds good. Is there anyway to use a TotalCMS macro to create a page title or page description? I’ve tried but seem to get

at either end of the url which of course breaks it.

Doable? Cheers

---

<div class="post-metadata">

**Author:** ![PaulRussam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/paulrussam/32/198_2.png) [@PaulRussam](https://forums.realmacsoftware.com/u/PaulRussam)\
**Post date:** [June 4, 2019, 2:54pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/4 "2019-06-04T14:54:36Z")

</div>

I do that all the time and can then use the macros for not only the page title/description but also with in the new SEO stacks.  
Here’s a ss of part of an admin page:

 ![Annotation%202019-06-04%20154743](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/6/6455593011eeae3967c4e2b3fabeafe83c762c01.jpeg)

They’re just std TotalCMS text fields called `home-title`, `home-desc`, `portf-title`, `portf-desc` etc.

I can then use the macros `%cmsText(home-title)%` wherever I want the title of the home page to appear or `%cmsText(portf-desc)%` wherever I want the description of the portfolio page to appear.

I

---

<div class="post-metadata">

**Author:** ![RapidBase](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/rapidbase/32/24626_2.png) [@RapidBase](https://forums.realmacsoftware.com/u/RapidBase)\
**Post date:** [June 4, 2019, 3:11pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/5 "2019-06-04T15:11:53Z")

</div>

> [@joeworkman](#):
>
> Do you want Total CMS to only provide part of the URL or the entire thing?
> 
> For the entire thing just use a macro and save the full URL into the CMS:
> 
> ```auto
> %cmsData(cmdid)% 
> 
> ```
> 
> If you want part of the URL, save that bit into the CMS
> 
> ```auto
> https://example.com/folder/%cmsData(cmdid)%/anotherfolder/
> 
> ```

Sorry for squashing inbetween…: Again I just realized that I never ever did use the cmsData macro until now. Can s.o. exactly tell me what this is for and what I can do with it? Ok, it’s not text, it’s not an image, it’s just “data”. I get that. But it seems that for the trees I can’t see the forest: I still cannot think of how to use this macro in a realworld scenario. Any hints or examples for me…? 😉 @joeworkman?

---

<div class="post-metadata">

**Author:** ![labanbrown](https://avatars.discourse-cdn.com/v4/letter/l/9fc348/32.png) [@labanbrown](https://forums.realmacsoftware.com/u/labanbrown)\
**Post date:** [June 4, 2019, 3:22pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/6 "2019-06-04T15:22:09Z")

</div>

Wow - that sounds great!

I did try something like that but had %cmsTextFormat(id)% so am guessing not having the ‘format’ will solve my

problem. I’ll check that out now…

Thanks!

---

<div class="post-metadata">

**Author:** ![joeworkman](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/joeworkman/32/23780_2.png) [@joeworkman](https://forums.realmacsoftware.com/u/joeworkman)\
**Post date:** [June 4, 2019, 3:35pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/7 "2019-06-04T15:35:47Z")

</div>

> [@RapidBase](#):
>
> I just realized that I never ever did use the cmsData macro until now

the cmsData macro provides the raw CMS content with zero modification. The cmsText macro will preserve newlines in the HTML.

---

<div class="post-metadata">

**Author:** ![PaulRussam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/paulrussam/32/198_2.png) [@PaulRussam](https://forums.realmacsoftware.com/u/PaulRussam)\
**Post date:** [June 4, 2019, 7:00pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/8 "2019-06-04T19:00:59Z")

</div>

I was guessing my macros names previously, they’re actually:  
`pagetitle_home`  
`pagedesc_home`  
`pagetitle_portf`  
`pagedesc_portf`

Here’s where I implement the page title macro:  
[![CloudApp](https://f.v1.n0.cdn.getcloudapp.com/items/3K121x1x352D2g1z3J3Q/Image%202019-06-04%20at%207.53.01%20pm.png "Image 2019-06-04 at 7.53.01 pm") ](https://cl.ly/6qu96lll)

Here’s my SEO stacks where I implement/abuse the description macro:  
[![CloudApp](https://f.v1.n0.cdn.getcloudapp.com/items/2b3S1D1g271j1K203N23/Image%202019-06-04%20at%207.58.43%20pm.png "Image 2019-06-04 at 7.58.43 pm") ](https://cl.ly/xQudy22Q)

---

<div class="post-metadata">

**Author:** ![labanbrown](https://avatars.discourse-cdn.com/v4/letter/l/9fc348/32.png) [@labanbrown](https://forums.realmacsoftware.com/u/labanbrown)\
**Post date:** [June 4, 2019, 7:28pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/9 "2019-06-04T19:28:22Z")

</div>

Thanks, PaulRussam - that’s spot on. It’s really useful and seemingly undocumented. Having the ability to change the page description and page title within the CMS admin is excellent.

Thanks for sharing your setup and help on this.

---

<div class="post-metadata">

**Author:** ![PaulRussam](https://dub1.discourse-cdn.com/flex005/user_avatar/forums.realmacsoftware.com/paulrussam/32/198_2.png) [@PaulRussam](https://forums.realmacsoftware.com/u/PaulRussam)\
**Post date:** [June 4, 2019, 8:00pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/10 "2019-06-04T20:00:06Z")

</div>

> [@labanbrown](#):
>
> seemingly undocumented

That’s one of the great things with the TotalCMS macros, you can use (abuse) them in lots of ways.  
Joe can’t document a use case that he didn’t imagine it could/would be used for. There are a few of us who’ve bent TotalCMS so far out of shape that it’s barely recognisable let alone documentable.

Once you get past the “how to” tutorials it’s up to you/us to invent new ways to abuse TotalCMS.

---

<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 4, 2019, 8:31pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/11 "2019-06-04T20:31:44Z")

</div>

> [@labanbrown](#):
>
> Having the ability to change the page description and page title

Further to Paul’s point, it’s surprising how many places you can use macros in other 3rd party stacks, as well. Most places that have a text input can have a macro so you can use it in a ton of places you wouldn’t even think to look.

---

<div class="post-metadata">

**Author:** ![labanbrown](https://avatars.discourse-cdn.com/v4/letter/l/9fc348/32.png) [@labanbrown](https://forums.realmacsoftware.com/u/labanbrown)\
**Post date:** [June 5, 2019, 7:47pm UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/12 "2019-06-05T19:47:01Z")

</div>

Just trying to add a TotalCMS macro to an accordion but am getting some padding under the text.

Anyone know if there way around this? I’m building using Foundry.

Cheers! ![07](https://europe1.discourse-cdn.com/flex005/uploads/realmacsoftware1/original/2X/0/0422f12174dd24a5456c634c8ae791721fbcfb2b.png)

---

<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 6, 2019, 5:49am UTC](https://forums.realmacsoftware.com/t/total-cms-macro-url/27131/13 "2019-07-06T05:49:07Z")

</div>

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