Total CMS Macro URL

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!

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:

%cmsData(cmdid)% 

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

https://example.com/folder/%cmsData(cmdid)%/anotherfolder/
1 Like

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

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:

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

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…? :wink: @joeworkman?

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!

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

1 Like

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

Here’s my SEO stacks where I implement/abuse the description macro:
CloudApp

1 Like

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.

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.

2 Likes

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.

1 Like

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

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