I've made a side column that lists the most recent news items (news items have some TVs included).
I have included this side bar (as a chunk across several different templates). But I notice that in order for the side bar to display the TV fields I have to enable the TVs for each template that utilises the sidebar.
The problem I am having is that when someone is creating content, the content form is asking for the TVs to be filled in on every single form.
For example. If I have an image field for the news section, in order for the image to be seen within the side bar across all templates, i have to enable the TV for all templates. The problem is that all resouces now require that I add an image as a TV.
MODx does not seem to use sub templates, so I am wondering how I go about resolving this issue.
Steve
[ed. note: rocknet last edited this post 12 years, 10 months ago.]
Thanks Dan, They are new to me as I'm a newbie. I'll look into it.
Steve
Hi there,
In the TV 'Input Options' did you see this?
Allow Blank:
If set to No, MODX will not allow the user to save the Resource until a valid, non-blank value has been entered.
Quote from: rocknet at Nov 07, 2013, 05:23 AM...i have to enable the TV for all templates. The problem is that all resources now require that I add an image as a TV. ... MODx does not seem to use sub templates, so I am wondering how I go about resolving this issue.
You have to tell each actual template to use this or that TV. This is an excellent feature, helps in better segregation in a more complicated senario.
It depends on what you mean by 'sub-template'. I leave off the LABEL of my goal, and put MODx to work, and it often achieves the goal itself.
Perhaps you could explain to us what it is you are trying to achieve.
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
Hello Donshakespere and Dan,
Thanks for taking the time to reply.
I'm trying to make a side column content area that appears on all pages (which use various templates).
Adding the side column and content is easy. My problem occurs when I try to list different resourcese in the side column eg. 3 news items, + 3 events etc.
I can create the lists - but with events for example I'd like to be able to display the date of the event (which I have created a TV for) along with the standard title etc. I can't do this without having to enable the TV for each template that the side column will be used on.
I know that the page forms don't have to have the TVs added, but the mere presense of the TV fields implies that the user should try to fill them in. But the fact is that the fields simply aren't used in some of the templates.
So the way I am doing it at present (which I hope is wrong) means that every single template is displaying every single TV field, just so I that can display the content in the side column.
There must be a better way.
I am going to look at the showTV plugin which reads like it could be what I am looking for. But I am suprised that I can't do this within the core functionality of MODx.
... Just had a look at showTv plugin and can't work out how to use it. It would be good to know if I can do it in core.
Steve
[ed. note: rocknet last edited this post 12 years, 10 months ago.]
you shouldn't need to add all TVs to all templates just to create a list of resources with different TV - sets.
how are you creating the list of resources in the sidebar?
whats your code for that?
Also do you need to run this uncached ! and do you need &includeContent=`1`
It'll run quicker without.