-
☆ A M B ☆
- 24,524 Posts
Great thanks, just the answer I needed. I probably look very silly some times (I sure do), but, please, make me a pardon for that, ok?
Another thing I didn’t find out from the wiki and forumsreading.
The thing is about snippets, chunks and (what do you think?) placeholders.
I have a chunk named {{write}} with a placeholder [+place+]. Also I have a snippet with a foreach cicle, that must output that chunk on each turn with different place strings.
What do I need to write?
-
☆ A M B ☆
- 24,524 Posts
You’ll be able to get better help if you scan through the forum topics and post these questions in the appropriate topics.
Try here
http://modxcms.com/forums/index.php/board,178.0.html
Quote from: almaron at Apr 03, 2010, 02:04 PM
Great thanks, just the answer I needed. I probably look very silly some times (I sure do), but, please, make me a pardon for that, ok?
Another thing I didn’t find out from the wiki and forumsreading.
The thing is about snippets, chunks and (what do you think?) placeholders.
I have a chunk named {{write}} with a placeholder [+place+]. Also I have a snippet with a foreach cycle, that must output that chunk on each turn with different place strings.
What do I need to write?
You’ll want to use $modx->getChunk() or modx parseChunk() for each pass and replace the placeholder(s). Then add the result to the output.
This will be inside the foreach loop:
/* with getChunk() */
$chnk = $modx->getChunk('write');
$chnk = str_replace('[+place+]',$value, $chnk);
$output .= $chnk;
/* using parseChunk(). You can have as many placeholders in the array as you need */
array $phArray = array('placeholder1'=>'replacement1', placeholder2=>replacement2);
$output .= $modx->parseChunk('write', $phArray);
This will be after the loop:
Thanks for creating this great tool , i was using joomla and typo3 but after developing my first web site in Modx Rev i dont think i will use them again.
My question is if there is a way to make manager work faster? When i press the TV button to expand (with less than 30 tv inside) i wait 5 secs for it to load.
Thanks in advance
Chris, Athens
Edit: The problem is solved now and was caused by my office network
Hi zatral
I see you are from SA.
You might try posting in Revolution Child Board of Release Support if no luck here.
Sorry I am unable to help you.
But welcome to MODx a great CMS and community.
Regards
Allan
DEVELOPMENT ENV:- Ubuntu 12.04 | MODx Revolution 2.2.8 | LAMP 2i Apache 2.2.22 | Php 5.3.10 | Mysql 5.5.31 MySQL client version: 5.5.31
Where do I go to change the path that the Evolution 1.0.3 Manager uses for the "Manage Files" selection under the "Elements" tab?
This is not an idle FAQ item. I would truly like to know. The path is currently set to an obsolete directory. I have no idea how that path was set in the first place.
Thanks!
I looked just like that in 1964.
-
☆ A M B ☆
- 24,524 Posts
In your Manager, go to Reports, System Info. You’ll see quite a bit of information on your site’s configuration, including the MODX_BASE_PATH.
If you don’t have a recent enough version of MODx to show this, upgrade your MODx.
If for some reason you can’t do that now, you can also find the information by clicking on the phpinfo "view" link in the System Info page, scroll to the bottom of that display, and look for the _SERVER["DOCUMENT_ROOT"].
Thank you, Susan,
Reports > System Info shows MODX_BASE_PATH to be set to the current path. (The site does operate properly, after all.)
Once on the case, I discovered Tools > Configuration > Interface & Features > File base path. "Aha," I said, as I pushed the Reset button and saw the path properly updated. However, Elements > Manage Files still showed the obsolete path and, of course, could not display any files.
My final "aha" moment was finding Tools > Configuration > File Manager > File Manager path. Clicking the Reset button put Elements > Manage Files right: Now I could upload to my production site.
These path resets were required as a side effect of migrating the site from my local development machine to my production Web host. Therefore, a suggestion for the Newbie FAQ is to explain the migration process in some detail, including the requirement to reset certain paths.
A more general idea would be to provide the user choice between terse Manager menu pages (for MODx old hands) and verbose, hint-laden menu pages (for MODx newbies). Verbose mode would provide insight into the purpose of each setting and nudge the user in the right direction.
For example, under verbose mode, I might have seen in the error message for Elements > Manage Files a suggestion to check and perhaps update Tools > Configuration > File Manager > File Manager path. Under terse mode, the suggestion would not appear.
If & when documentation may be stable enough to make it practical, the brief hints also could link to appropriate sections of the documentation. Less work and perhaps equally useful: the hint texts could employ key words known to result in productive search of the documentation.
This is asking a lot of the volunteer-based MODx project, especially as it continues to release Evolution updates even while it plows ahead with Revolution.
Regards,
Halfnium
I looked just like that in 1964.