MODX Community

Enter text once, repeat everywhere?

Good evening all,

I have a silly simple question. I used to use a ModX extra and I cannot remember its name, but you could enter the information once and then call it any other time you needed it. For example, I have a header with links to pages, and I have also put them in the footer, and elsewhere.

I remember using an extra where I could just take that info and repeat it, and change it once in the back end and it would change it everywhere.Could anyone recommend the package to me?

Thank you in advance

ClientConfig? Or you could also use system/context settings.

1 Like

You could install pdoTools (if not already) and make use of the fastField parser to get any placeholder or TV from any resource. This way you can manage the contents in one resource and fetch it from within all other templates like this:

[[#15.tvname]]
1 Like

just use chunks for that?

1 Like

I frequently set up repeating elements that I want my clients to be able to edit, like footers, as regular resources. I don’t want them to have access to snippets and chunks, plus chunks don’t have a WYSIWYG editor. So I make a folder called “common elements” and put Footer in there, for example, fully formatted and easily edited by the client. Then, in the page templates, a simple tag " [[#NN.content]] " fetches the footer content for every page, if you have FastField installed. If you don’t have, or don’t want, FastField, create a snippet instead (like “footer”), with this content:

return $modx->getObject(‘modResource’,NN)->content;

1 Like

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