<![CDATA[ Ditto evo modx conclusion of the parent content - MODX Community Forums]]> https://forums.modx.com/thread/?thread=95700 <![CDATA[Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518048
I use your CMS and ran into a problem

It is impossible to separate the parent to deduce content to the page, all content is displayed in full on all pages

Level structure:

level 1
--level 2
level 1
--level 2
--level 2
--level 2
--level 2

level 1
--level 2

small code:
[[Ditto? [u]&parents=`[*parent*]`[/u] &id=`portfolio-content` &depth=`1` &tpl=`portfolio-content`]]

This code displays the entire contents of the pages, but it is necessary for each page of your
almag13 Jan 07, 2015, 10:30 AM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518048
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518247
it was much easier
did not need to withdraw this part through Ditto was enough to specify a template that we derive the content: [*content*]

Thx for help
topic can be closed]]>
almag13 Jan 10, 2015, 11:35 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518247
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518243
First level have content


the second level is similar, but has its content

almag13 Jan 10, 2015, 03:26 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518243
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518204 I create a page in another page which exist

Content is present as the parent page and on the inner. To display the same pattern is used for these pages.

Now the following happens all the content displayed on the same page, so it should be, but in different places you want to display internal pages and parent]]>
almag13 Jan 09, 2015, 04:58 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518204
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518200
You want the content of level 2 to be shown on level 1 - but the content shouldn't show on the level 2 pages ?

And you only want to show the content of level 2 on level 1 on a per page basis ?

Well confusing

Do you have an example anywhere ?

If you don't want level 2 to be shown unpublish them and change the Ditto call by adding: "&showPublishedOnly"

I don't know if this will help but you can also pre-define specific document(s) to be shown using: "&documents"

This post may or may not help, as I am not sure I fully understand your requirements.]]>
iusemodx Jan 09, 2015, 03:01 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518200
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518195 Thx for help!

Yes on `[*id*]` implementation will be true, because the content is displayed in the right place for everyone.
But this realization brings a null value, on the other hand, when the realization comes with the `[*parent*]`, the output unit without any problems.

Thanks for the snippet length restrictions conclusions content, it may be useful to someone. I need to display all the content

Now I have applied to the conclusion the `[*id*]` and the conclusion was not the parent content, and all the subsidiaries blocks

Tree when using &parents=`[*id*]`:

Level 1 ---- not show
----Level 2 ----- show
----Level 2 ----- show

Level 1 ---- not show

----Level 2 ----- show
----Level 2 ----- show

But needed:

Level 1 ---- show (only one this page)
----Level 2 ----- not show
----Level 2 ----- not show

Level 1 ---- show (only one this page)

----Level 2 ----- not show
----Level 2 ----- not show

Above example works with &parents=`[*parent*]`, but i see all content list on one page:
level 1 ([id = 1]),
level 1 ([id = 3]),
level 1 ([id = 5]),...
almag13 Jan 09, 2015, 12:15 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518195
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518134
What I understand is you have a main page (parent - level 1) that pulls in content from other pages (child pages - level 2) - similar to a blog overview page, where it shows excerpts of its child pages content.

I presume your main page (parent) has the following in it:
[[Ditto? &parents=`[*parent*]` &id=`portfolio-content` &depth=`1` &tpl=`portfolio-content`]]

What I don't understand here is the:

I don't think that works - I may be wrong. I was under the impression that the following is used as it designates (in this situation) its own ID:

Side tracked there, sorry

If you are calling "[+content+]" in your "portfolio-content" template you will always output all of the contents of the main content box / area of that page.

If you only want a part of the content you need to cut the amount of characters down and you will need to strip the HTML tags as well.

You can use Ditto's built in PHX functions to do that:

Create 2 new snippets:

return($modx->stripTags($output, $options));

$retval = $output;
$array = explode(" ", $output);
if (count($array)<=$options)
	 $retval = $output;
	 $retval = implode(" ", $array);
return $retval;

This is just a guess, so if it's wrong you will have to modify as required:

In your "portfolio-content" template, change "[+content+]" to this:

The new call delimits the snippets using ":" therefor both snippet calls are added in one.]]>
iusemodx Jan 08, 2015, 03:58 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518134
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518123 Quote from: banzai at Jan 08, 2015, 01:19 AM
Please, post your "portfolio-content" tpl

Do you use "[+summary+]" or "[+introtext+]" ?

No, I bring the standard content

But modx displays all the articles at]]>
almag13 Jan 08, 2015, 01:19 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518123
<![CDATA[Re: Ditto evo modx conclusion of the parent content]]> https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518077
Do you use "[+summary+]" or "[+introtext+]" ?]]>
banzai Jan 07, 2015, 07:19 PM https://forums.modx.com/thread/95700/ditto-evo-modx-conclusion-of-the-parent-content#dis-post-518077