Git Product home page Git Product logo

Comments (4)

halftrainedharry avatar halftrainedharry commented on July 28, 2024 1

Is there a reason why you use an image TV "slider_src" and not just "inputTVtype":"image"?


Maybe try using the setting "sourceFrom".
It kind of seems to work if I use "sourceFrom": "migx" in "about_slider_items" and "sourceFrom": "tv" in "about_slider" and set the correct media-source in the TV "about_slider_items".

about_slider_items

[{
	"caption": "Слайдер",
	"fields": [{
		"field": "image",
		"caption": "Изображение",
		"inputTV": "slider_src",
		"sourceFrom": "migx"
	}]
}]

about_slider

{
	"field": "items",
	"caption": "Изображения",
	"inputTV": "about_slider_items",
	"sourceFrom": "tv"
}

Also, have you tried using MIGX configurations (menu "Extras" ("Пакеты") -> "MIGX" ->tab "MIGX") instead of putting all the settings directly into TVs?

from migx.

Bruno17 avatar Bruno17 commented on July 28, 2024

did you try to debug, what happens in getFieldSource?

from migx.

Ruslan-Aleev avatar Ruslan-Aleev commented on July 28, 2024

I tried debug, but I didn't quite understand the logic. getFieldSource returns $mediasource = $this->getDefaultSource() it seems.
Maybe the problem in prepareSourceForGrid($inputTv) in the line $tv = $this->modx->newObject('modTemplateVar') I tried watching ID TV and sources and the last TV didn't have ID.

from migx.

Ruslan-Aleev avatar Ruslan-Aleev commented on July 28, 2024

Is there a reason why you use an image TV "slider_src" and not just "inputTVtype":"image"?

I'm using inputTV to set the media source. There is probably another option, but this one is more familiar to me, and it works reliably.

Maybe try using the setting "sourceFrom".

Yes, this works, thanks.
I solved this using renderChunk, where I set the id media source:

[{
"dataIndex": "image",
"header": "Изображение",
"sortable": "false",
"renderer": "this.renderChunk",
"renderchunktpl": "<img src='/promtConnectors/system/phpthumb.php?h=80&f=png&src=[[+image]]&source=4'>",
"width": "900"
}]

Also, have you tried using MIGX configurations (menu "Extras" ("Пакеты") -> "MIGX" ->tab "MIGX") instead of putting all the settings directly into TVs?

For this task it is unnecessary, as it seems to me, MIGX configuration takes a lot of time.

I understand that the problem can be solved in different ways, BUT the fact that the current option works a little incorrectly is 100%.

from migx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.