Creating &amp; Repurposing Content - MODX Community Forums <![CDATA[ [Collections] How to get pagetitle from the id on the collections view ?]]> I have a Collections view with a resource's ID column.
I want to render those IDs with their respective pagetitle.
So I create a snippet called getPagetitleFromID which I call from the Snippet columns view parameter.

But I don't know how to make this snippet code.
I read a little bit xPDO docs but I was a little bit affraid !!!

For now, I have just wrote this but it doesn't work :
$value = $modx->resource->getOne('value');
return $value->get('pagetitle');

Is anyone can help me ?]]> Sun, 02 Sep 2018 07:24:39 +0000
<![CDATA[pdoField Parent Resource]]>
Using a Chunk that returns the SimpleSearch results row I'm trying to include the pagetitle of the (ultimate) parent of each result. Regardless of search criteria there are only 3 possible parent options (resources 2, 3, and 4) at the site root.

I've tried pdoField, UltimateParent and getResourceField but none of them return the correct (ultimate) parent of the search result.]]> Mon, 07 May 2018 04:44:27 +0000
<![CDATA[createdon date format]]>
When I reformat the default createdon date (2018-04-14 01:42:55) to a simple month/day/year I get an incorrect date: February 27, 2015. Not sure where that date is coming from.

I followed Bob's article
[[!DateFormat? &field=`createdon` &formatString=`%b %d, %Y`]]
]]> Sat, 28 Apr 2018 09:45:00 +0000
return  $count > 1?  's' : "";

On the template I use pdoPage to grab all the resources created by a specific user:
    &where=`{"createdby:=":[[!getUrlParam? &name=`author` &int=`1`]]}`

Then this to display a message:
    &user=`[[+createdby]]` &useExtended=`1`
[[+member]] has [[!]] articles[[!pluralFilter? &count=`[[+total]]`]].

I've compared the problem page with other working pages and don't see any reason why this one page is failing to pluralize.]]> Wed, 04 Apr 2018 09:04:41 +0000
<![CDATA[User-selectable Limit]]>
Using pdoResources / pdoPage (and pagination controls) to show a listing of resources is there a way to allow a visitor to select the number of results to display using a picker?

Right now I'm using the &limit=`10` property but it's static, I would prefer the value be set from the front-end. For example, the default value might be 10 with additional picker options of 15, 20, Show All. And changing the value would automatically refresh the page.]]> Wed, 28 Mar 2018 10:10:42 +0000
<![CDATA[Append Paging URL]]>
I'm using pdoResources to list the resources of three different folders, all on a single page. Each group of resources is wrapped in its own parent container with its own id (and pagination). For example:
<section id="one">
<resources here>
<paging controls>

<section id="two">
<resources here>
<paging controls>

<section id="three">
<resources here>
<paging controls>

Works great.

What I would like to do is append the paging url with the id (anchor) of the parent section. So for example, if a paging link in section 3 were clicked the id three would get tacked on like this, mysite/results.html?reviews=2#three or like this mysite/results.html?tutorials=2&reviews=2#three (depending on which and how many sections are being "paged"). This way the user is taken directly to the relevent section on the new page without having to scroll. Anchor 101.

My problem is I'm uncertain how to grab the correct id on the fly and append it. Or if it's even possible.]]> Sun, 25 Mar 2018 03:52:33 +0000
<![CDATA[Adding MODX Combo to Collections list]]>
So far I have the editor set to: {"xtype":"modx-combo","data":["FR","SO","JR","SR"]} but the data does not show up as options. Is it just not implemented? The TV is a dropdown menu so I'd like to only allow the options contained in the TV to be edited from the list.]]> Mon, 26 Feb 2018 12:01:33 +0000
<![CDATA[modxTalks]]> modxTalks.
Unfortunately the latest version 1.0.4 isn't without errors. Maybe someone can help or has any idea about this?

My system: MODX 2.4.1 | modxTalks 1.0.4 | PHP 5.6.10

1) Error Log:
Table 'modx.modx_modxtalks_mails' doesn't exist
-> solution link

2) Error Log (after solution 1):
(WARN @ /www/htdocs/xxxxxx/modx/core/components/modxtalks/mailer.php) `114` was requested but no alias was located.
(INFO @ /www/htdocs/xxxxxx/modx/core/components/modxtalks/mailer.php) Removed modxTalksMails instance with primary key 10
-> so far no solution found (my russian is not well)

3) MODXTalksPlugin:
It seems the plugin missing the Event "OnModxTalksCommentAfterRemove"?

]]> Fri, 05 Jan 2018 10:26:10 +0000
<![CDATA[getRelated: automatically listing related Resources for Revolution]]>
You can install it via the Package Manager.

It has been developed by Mark Hamstra for Vierkante Meter.

Bugs & Features:]]> Sun, 26 Nov 2017 08:06:15 +0000
<![CDATA[getPage, not showing results]]>

I'm using the Collections addon for my Blog. On my homepage I show the 7 most recent resources. I've created a total of 8.

I intend to use getPage to add pagination.
So with getPage installed, I used the following snippet call inside my home template:

[[!getPage? &element=`getResources` &parents=`2` &limit=`2` &showHidden=`1`]]
                  <ul class="pagination pagination-sm">[[!+page.nav]]</ul>


I get 4 page results while it should have shown 2! Anyway, then when I click on page 2 of 4, the URL nicely shows:

but I get the same page in return, which is page one basically :S

What am I missing?

John]]> Sun, 12 Nov 2017 08:31:51 +0000
<![CDATA[Showing future events that are 7 days from current day]]> Sat, 04 Nov 2017 09:44:24 +0000 <![CDATA[Parent(s) list based on children TV]]> So we have initially:
- child_01

- child_N
- child_01

- child_N
Parent_N etc.

I want to list only the parent(s) based on its children, if a child has a TV with value set to 1. If there are no children with the TV=1, no parent should be listed.
So, If there one or more children, the relevant parent must be listed. I don't want to list the children, only the parents.

Any ideas to accomplish with getResources or pdoResources?
]]> Mon, 12 Jun 2017 08:34:43 +0000
<![CDATA[Next/previous resource?]]>
I'm looking at a way to pull the previous/next resource aswell as the page title. I've tried to use BasicNav but it doesn't pull the pagetitle, it's for a news page where you'll be able to go to the previous/next news article.

Thanks!]]> Thu, 01 Jun 2017 12:32:46 +0000
<![CDATA[StageCoach Version 1.1.0-pl Released]]>
StageCoach creates a "staged" version of the Resource that will replace the original at the specified date and time. All you need to do is set the date in the "Stage Date" TV.

The new version has been refactored to use the OnWebPageInit event, which makes it more reliable for use with cached resources. An option to update the publishedon date has been added and some minor bugs have been fixed.

]]> Thu, 01 Jun 2017 04:27:47 +0000
<![CDATA[jquery.calendario.js - getresources - daily resource]]>
I am trying to find the right calendar solution for my needs since the calendars offer through modx arent what Im looking for. (DocCalendar for EVO was almost right except I couldnt figure out how to do daily resources from a single resource).

So Im trying jquery.calendario.js from

I am able to make a resource event-data.js in modx Revo and have my call in it to grab a date TV, title, resource URL and have it work.

var canvasEvents = {
[[!getResources? &parents=`4` &includeTVs=`1` &processTVs=`1` &tvPrefix=`` &limit=`100` &tpl=`event_js`]]

But I have some daily events that I would like to only use a single resource (so I dont have to make 30 resources for 30 days) and show on every day of calendar.

Is this possible? I would pay someone for getting this working now I need it.
]]> Mon, 08 May 2017 12:25:51 +0000
<![CDATA[FileLister - Sorting Directories?]]>
Thanks in advance.]]> Wed, 29 Mar 2017 03:09:46 +0000
<![CDATA[pdoTools - pdoPage/pdoResources publishedon/createdon dates not displaying with formatting]]>
Using getPage, I had the following line in my tpl file, which displays the createdon date as "X days X weeks X months ago" and hovering over that text shows the publishedon date in a jQuery tooltip.
<span class="tip date-tip" data-tip="[[+publishedon:strtotime:date=`%b %d, %Y - %I:%M %P`]]">[[+createdon:ago]]</span>

Switching over to pdoPage, my snippet call looks like this:
[[!pdoPage? &parents=`6` &limit=`5` &sortby=`publishedon` &sortdir=`DESC` &tpl=`blogPostSummary`]]

The blogPostSummary chunk looks like this:
<div class="post-summary-box gray-box">
    <h3><a href="[[~[[+id]]]]">[[+longtitle:is=``:then=`[[+pagetitle]]`:else=`[[+longtitle]]`]]</a></h3><a class="comments-link" data-disqus-identifier="page-[[+id]]" href="[[~[[+id]]? &scheme=`full`]]/#disqus_thread">Comments</a>
    <p class="post-info">Posted <span class="tip date-tip" data-tip="[[+publishedon:strtotime:date=`%b %d, %Y - %I:%M %P`]]">[[+createdon:ago]]</span> in [[!TaggerGetTags? &resources=`[[+id]]` &rowTpl=`taggerRowTpl` &separator=`, ` &target=`14`]].</p>
    <div class="entry">
        <a class="read-more-link" href="[[~[[+id]]]]">Continue Reading</a>

If I use only [[+publishedon]] or [[+createdon]], it displays the date in unix timestamp as expected, however with any sort of output formatting the publishedon tag shows nothing and the createdon tag shows "47 years, 2 months ago". Searching around Google and the forums hasn't produced any issues like mine that I've found.

I appreciate any help!]]> Wed, 08 Mar 2017 12:29:49 +0000
<![CDATA[Where queries on number TVs]]>
I'm using pdoPage to show products with pricing, but when i'm adding a where query i can't get products between a certain price range. Below a simple version of the code:


When filtering on text values it works perfect. When using interget values it does some filtering but it seems like it handels it more like Text than a Interger... does anybody know what i'm doing wrong?


]]> Tue, 28 Feb 2017 02:59:58 +0000
<![CDATA[Created resource to be used across multiple contexts]]>
I have a project, it is going to be 6 websites managed by MODx. I know I can do this with contexts. But the kicker is a special thing they want. They want to add a "Service" and that service would appear in all contexts, but they only want to add it once and edit it in one place. So is their a way to add a Resource in the "web" context and have it duplicated or accessible in the other contexts?

So if it is in the web context it would be

but they also want it to show up on the others like

Is this possible? I did some research on the ’Babel’ Add-on and it seems like that syncs resources so you can edit the english resource and it will make that modification to all the resources in different languages in their contexts.

Please let me know, this is killing me.

I am using the latest release of MODx 2.0.7]]> Mon, 13 Feb 2017 07:26:48 +0000
<![CDATA[Different behaviour FileLister after upgrade 2.5.1]]> suddenly FileLister on that page adds filesize, lastmod and a 1 or 0 behind the link.

Benelux HeraldN1.pdf 58.45 kb Oct 24, 2016 1
Benelux HeraldNAll.pdf 243.62 kb Oct 24, 2016 0

The 2.4.1 version did not use a chunk but resulted in a perfect link-list.
[[!FileLister? &path=`assets/files/Her/` &outputSeparator=` /..` &sortDir=`DESC` &sortBy=`filename`]]

Benelux HeraldN1.pdf
Benelux HeraldNAll.pdf

Everything is the same, but I cannot find the reason for this sudden addition...

Installing chunks for listings does not have any effect, the additions just keep showing up.
]]> Thu, 10 Nov 2016 09:43:04 +0000