Hi there,
I’m slowly but surely working my way through my first ever MODx site, pretty much starting from the top-down.
Firstly, I’m attempting to create a header and I’ve already got Wayfinder (which is a wonderful piece of kit) creating a menu. Currently, I have a logo for the site (not yet implemented) that I’d like to add to every page (obviously), but the client expressed an interest in being able to change it at will.
Assuming that my client isn’t all that copmuter-savvy, could anybody recommend a method that would make this possible? I must admit, I hardly know any php, but Im willing to have a bit of a poke around to get things done.
Thanks in advance,
Chris
Edit: I’m using Revolution 2.0.7 should it make any difference.
That looks very promising - I’ll give it a go.
Thanks!
Thanks pleth.
That may be a little over-kill in this instance, but I’ll certainly bookmark it for future reference.
I’ve acquired and installed the GetResourceField add-on, but am having a little trouble making it access the TV I’ve created.
One a page called "home" I’ve added a TV called "logo" which simply outputs an image file.
Then, in the "header" chunk that will be included on every page I have added the following:
[tt][[getResourceField? &id=`home` &field=`logo` &processTV=`1` &default=`Logo`]][/tt]
But nothing seems to output at all, which is leaving me puzzled...
Any suggestions?
Edit: I’ve changed the [tt]&id=`home`[/tt] to [tt]&id=`1`[/tt] and it seems to partially work, in that it outputs the filepath, but not the file itself.
Wrapping this output in the following did the trick:
[tt]<img src=" ... " />[/tt]
Answered my own question, but may as well leave it here in case anyone else has similar trouble.
-
☆ A M B ☆
- 24,524 Posts
Snippets almost always use the resource ID; the pagetitle usually considered the "name" of a resource can change, but the resource ID is always the same.