Hi sorry for posting such a simple question but I can’t seem to work it out.
I want to create a TV for a footer text which will appear on ALL pages within my site. However, the TV appears on every page and I must fill it out on every page rather than filling it once and appearing on all pages. In other words I want a global TV that I fill out once and it appears on all my footer.
I hope this makes sense.
This kind of thing is normally dealt with using chunks. Create a chunk with the proper footer html and add it to the bottom of your templates.
Hi I did that,
I created a chunck and then placed it in the main html. But I still have to change the TV in every page. What am I doing wrong.
Doing what I suggested you should not need a TV at all. What are you using the TV for?
I want to be able to change the text that appears in the footer from the manager. Without having to change any code.
-
☆ A M B ☆
- 24,524 Posts
If you don’t want to edit a chunk (which is the usual way to do this, just a chunk, with [[$chunkname]] tags - chunks are all HTML or plain text, no code) then you can use a TV with @DOCUMENT binding. This will have it use the content of the resource whose ID # you specify. For example, @DOCUMENT 45 will take the content of resource #45, which you can then edit like any other resource. You should probably have that resource use no template (blank) and it should definitely be set to not show in a menu.
I’ll put "utility" resources like this that are never intended to be directly accessed in an unpublished container resource named "Tools". That way I know where they are.
Sorry if i sound a bit silly here, but I’m trying to find documentation on this and what I have found doesn’t really explain much. So if I understand you correctly, I need to create a TV with a @document binding which links to the Chunk id? Then place this chunk in my main html template?
-
☆ A M B ☆
- 24,524 Posts
No. If you’re OK with editing a chunk, just use a chunk. No TV. The TV with DOCUMENT binding was only in case you don’t want to edit a chunk, you want to stick to editing resources.
The only purpose of using a TV is so that the value can vary (hence the name, Template VARIABLE) from resource to resource. If you want all resources to use the same content, use a chunk. That’s what it’s for.
The thing is I want my client to change this text from an input field - nice and simple. They will freak out if they see anything resembling coding/html.