In MODX Revolution CMS Chunks are "blocks" that contain textual content. These blocks are used across a website. They cannot have any logic (PHP). However, they can call Snippets (which are executable pieces of PHP) to generate output. Questions about chunks and their usage might have this tag.
Questions tagged [modx-chunks]
28 questions
1
vote
4 answers
modx create layout with chunk and call with template
I'm using modx revolution. I'd like to create a chunk called layout that calls other chucks example
Head
header
nav
body
footer
then in my template do something like //open layout tag[[$layout]] [[$layout]]//close layout tag. then inside of the the…

Code Junkie
- 7,602
- 26
- 79
- 141
1
vote
1 answer
MODx - How to create MIGX inside another MIGX?
Good day!
To my regret I can not create migx inside another migx.
Below is the code that I use.
mainTV (slider):
[
{"caption":"Info", "fields": [
{"field":"slider_title","caption":"Header row","inputTV":"slider_title_row"},
…

Сергей Бордун
- 31
- 2
1
vote
2 answers
If getResources parent is not empty display chunk
I'm a noob in the modx world. I have a page with subpages and I using getResources to display the content of those in tabs on the parent page.
What I would like to do is only display that chunk if the parent has subpages?
So something like this, but…

user2540055
- 11
- 3
0
votes
0 answers
MODX SimpleSearch uses always the default container
I am using SimpleSearch with the default containerTpl setting (=SearchResults).
It seems that SimpleSearch uses the chunk from core/components/simplesearch/elements/chunks and not my SearchResults chunk which has been saved in the database. So no…

Niko Suominen
- 97
- 9
0
votes
0 answers
Search function with multiple input field
is there a chance to search with evoSearch with 3 items? I would like the search results page to show the result only if the page meets all 3 conditions? TVs added to the document will be checkboxes with the possibility of multiple selection
Below…

yanq
- 1
- 1
0
votes
1 answer
Why can't I save Chunks that contain links to CDNs?
I have a Chunk for my header. In it I have several links to CDNs like Bootstrap, eg:
All of a sudden I can no longer save updates to this Chunk.
Same issue with copying the contents to a new Chunk.
Would anyone know what I could do?

MeltingDog
- 14,310
- 43
- 165
- 295
0
votes
1 answer
Dynamic placeHolders
I would like ask, if anyone knows how can I make a dynamic placeholders using an array. Basically I have this structure, and need to create a placeholders where the "name" has the "content"
{
"name": "bigTitle",
"type": "text",
"content": "Got…

Andres Perez
- 25
- 2
0
votes
2 answers
Removing an Modx extra manually
I have installed a few extras via Installer but removed them later. However, Installer has not been able to remove them successfully. For example, site log is now full of error messages of partially installed/removed extras.
How could I remove…

Niko Suominen
- 97
- 9
0
votes
1 answer
Chunks not saving self-closing tags. Any way to fix?
I've set up a brand new site on 2.6.5.
As per my usual practice, I set up a head chunk. However I noticed it was not saving. On experimentation I see that it is not saving self-closing tags.
For example
My test…

MeltingDog
- 14,310
- 43
- 165
- 295
0
votes
1 answer
How to create ContentBlock with multiple text inputs?
I'm using ContentBlocks from Modmore, and am trying to figure out how to create a new content block that has an input that allows the user to enter a title and another for a source URL. My goal with this is to expose these fields so that they can be…

hRdCoder
- 579
- 7
- 30
0
votes
0 answers
HTML in MODX Manager GUI is not reflecting that on static file
I'm messing around with static files for the first time. I want to make all my templates and chunks static .html and .php files.
However, there is one issue: the changes I make to my files do not seem to appear within the MODX GUI, and vice…

MeltingDog
- 14,310
- 43
- 165
- 295
0
votes
1 answer
IDX condition in a getresource tpl
I use getresource like this:
[[!getResources? &tpl=`coffrets_id` &parents=`1115`]]
inside coffrets_id tpl I'd like to be able to do something like this:
[[+idx:is=`1`:then=`show only first getressrouce result`:else=``]]
[[+idx:is=`2`:then=`show…

sutrah
- 3
- 1
- 2
0
votes
0 answers
languageContext in front of [[+uri]] to fix the link
I use pdoTools, pdoNeighbors and babel for a multi-language Website on MODX Revo.
In pdoNeighbors I define Chunks.
[[pdoNeighbors?
&sortby=`menuindex`
&sortdir=`DESC`
&resources=`-23`
&tplPrev=`tplLinkZurueckEn`
…

AndyWizz
- 113
- 8
0
votes
1 answer
iframes won't save in MODX pages or chunks
I'm trying to embed items from YouTube and SoundCloud into my MODX (2.4) site. For example:
0
votes
1 answer
ModX gives me empty page of my document
I have Document- "news", where are a lot of articles(children documents), if I click on some article, ModX gives me empty page with the current alias name in url. Error Log shows me
[2015-09-02 17:06:38] (ERROR @ /index.php) Could not retrieve data…

Maximus Dredoff
- 306
- 3
- 17