<![CDATA[ Resource list tv in migx? - My Forums]]> https://forums.modx.com/thread/?thread=83297 <![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=3#dis-post-555769 Sorry but I can't find the answer:
I have MigX structure with field of 'inputTVtype:url'
Input consists 2 part of field: the protocol (http, https, ftp etc.) and the address.
How can I get the protocol part?

Thank you in advance!
]]>
tca_by Dec 07, 2017, 07:31 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=3#dis-post-555769
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=3#dis-post-552797 In terms of the MIGX markup, I had everything set up correctly.
All I was simply trying to do was set up links on one page that jump to corresponding
named anchors on another page.
The problem appeared to be with the template structure that I had based my destination document on...
It contained two or three if/else snippet tags (generated by the 'If' extra)...
for example 'if page id 'x' then no header, if page id 'x' then no footer etc.
And even though my id anchors were showing up in Page Source as intended,
they still appeared to be lost when the page was displayed;
On clicking the link to the named anchor I could see a flash of the named anchor at the
correct position on the destination page, before it would reload leaving me at the top of the destination page.
So I think a template issue and not a MIGX one...

But many thanks for your time Bruno
And I will look at your suggested MIGX - configurator - CMP workflow...]]>
geordiechris Jul 26, 2017, 09:42 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=3#dis-post-552797
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-552781
https://github.com/modxcms/revolution/tree/2.x/core/model/modx/processors/element/tv/renders/mgr/input

minus ".class.php"

+ many of custom TV input types, like colorpicker, imageplus, migx, migxdb ...., if installed


the best way to configure your MIGX-TV is the MIGX - configurator - CMP, but you could also add inputOptionValues into the field - definition.
See:
https://forums.modx.com/thread/91403/single-select-listbox-entries-in-migx#dis-post-500011]]>
Bruno17 Jul 25, 2017, 04:21 PM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-552781
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-552780
Did you ever find that list of inputTV types?

In the MIGX docs it talks about...
"Helper" TVs still work but are no longer needed; use inputTVtype: instead of inputTV:


but I find this simply doesn't work with text or any other types.
The problem I have is I cannot find any definitive article saying what, for example,
radio buttons or Listbox (Single-Select) should be...
i.e. "inputTVtype":"option" or "inputTVtype":"listbox"

So when I use something like
{"field":"day", "caption":"Day", "inputTVtype":"listbox"},

the grid appears to build ok, but there are no drop down options to select]]>
geordiechris Jul 25, 2017, 02:41 PM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-552780
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-534720
Is really simple to add a resource list field with Migx.
Just add :

"inputTVtype":"resourcelist"

Like this

{"field":"link","caption":"Link","inputTV":"resourcelist"}

It could be nice to get a list of all possibilities inputTv type.

Thanks you very much Bruno17 for this Extra.
Sorry for my English (I'm a lazy French guy).

EDIT : {"field":"link","caption":"Link","inputTVtype":"resourcelist"}]]>
Steeve Nov 24, 2015, 05:19 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-534720
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-469344
{
          "MIGX_id":2,
          "field":"image",
          "caption":"Image",
          "description":"",
          "description_is_code":"0",
          "inputTV":"",
          "inputTVtype":"image",
          "configs":"",
          "sourceFrom":"config",
          "sources":[
            {
              "MIGX_id":1,
              "context":"web",
              "sourceid":1
            },
            {
              "MIGX_id":2,
              "context":"de",
              "sourceid":1
            }
          ],
          "inputOptionValues":"",
          "default":""
        }


the not beautyfied version when doing 'edit raw' is:

{"field":"title","caption":"Title","MIGX_id":1},{"MIGX_id":"2","field":"image","caption":"Image","description":"","description_is_code":"0","inputTV":"","inputTVtype":"image","configs":"","sourceFrom":"config","sources":"[{\"MIGX_id\":\"1\",\"context\":\"web\",\"sourceid\":\"1\"},{\"MIGX_id\":\"2\",\"context\":\"de\",\"sourceid\":\"1\"}]","inputOptionValues":"","default":""}


So I guess you can use something like that directly for a field in formtabs.

It should also work with using a inputTV and then configure it with sourceFrom: TV]]>
Bruno17 Jun 18, 2013, 10:07 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-469344
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-469343 Quote from: Bruno17 at Mar 26, 2013, 01:07 AM
there are just some settings possible for inputTVtype:

mediasources, input Option Values, default value, configs(for MIGX and MIGXdb TVs), caption, description(since 2.4)

If you need more advanced settings on special TV-input-types you will need to use a inputTV.
So how do I specify the media source for in inputTVtype of image? Apparently simply assigning the TV to a media source like any image-type TV doesn't do the trick. Can it be done in the Form Tabs field, or do I need to use a Configuration?]]>
sottwell Jun 18, 2013, 09:48 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-469343
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-465605 I was having similar issues. That ugly php in Input Option Values can be replaced with a @CHUNK binding.
Ex.: Input Option Values -
@CHUNK PageLister

Chunk PageLister content -
[[getResources? &limit=`0` &tpl=`@INLINE [[+pagetitle]]==[[+pagetitle]]:[[+id]]` &parents=`3,19` &outputSeparator=`||`]] 

Works like a charm and much more of a MODX way.]]>
romangetman May 07, 2013, 03:50 PM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-465605
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-460297
page title==pagetitle:id


it's pretty ugly but this is what I am using with a single listbox tv (in input option values)

@EVAL $output = $modx->runSnippet('getResources',array('parents'=>'0','tpl'=>'@INLINE [[+pagetitle]] [[+parent:isnot=`0`:then=`(`:else=``]][[getResourceField? &id=`[[+parent]]` &field=`pagetitle`]][[+parent:isnot=`0`:then=`)`:else=``]]==[[+pagetitle]]:[[+id]]','outputSeparator'=>'||','sortby'=>'pagetitle','sortdir'=>'ASC','limit'=>'0'));return '- Select a page==||' . $output;


and then in your migx tv, in the grid columns field add the renderFirst render:

{
  "header": "Internal link", "sortable": "false", "dataIndex": "page","renderer":"this.renderFirst"
}
,

for the front end you can use a simple snippet to pick what value to display:

<?php
$val = explode(':',$input);
return $val[0];


and in your chunk

[[+page:renderFirst]]
]]>
eighthday Mar 26, 2013, 04:02 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-460297
<![CDATA[Re: Resource list tv in migx?]]> https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-460262
mediasources, input Option Values, default value, configs(for MIGX and MIGXdb TVs), caption, description(since 2.4)

If you need more advanced settings on special TV-input-types you will need to use a inputTV.]]>
Bruno17 Mar 26, 2013, 01:07 AM https://forums.modx.com/thread/83297/resource-list-tv-in-migx?page=2#dis-post-460262