MilenKo

Learn & Launch project

147 posts in this topic

2 hours ago, Robin S said:

to show a small list

Well, so I did not understand the question after all :( Maybe I should drink my morning coffee first:-[

Edited by szabesz
typo
1 person likes this

Share this post


Link to post
Share on other sites
26 minutes ago, Robin S said:

There is no built-in method to do this efficiently in PW

Another way... adapt this SQL query by Ryan:

$table = $fields->get('my_page_field')->getTable();
$query = $database->query("SELECT data FROM $table");
$ids = $query->fetchAll(PDO::FETCH_COLUMN);
$count_values = array_count_values($ids);
// use the pages IDs and counts as needed, for example:
foreach($count_values as $key => $value) {
    $p = $pages->findOne($key);
    echo "<p>{$p->title} (selected in $value pages)</p>";
}

 

Share this post


Link to post
Share on other sites

@flydev & @szabesz I have already placed the keywords in place for every page I need them and now am able to select already existing or add a new if needed so now I am aiming at showing some "top" keywords on the main page. And to be clear, by "top" I most probably would select to choose the tags that were used the most. Btw 'reading the morning coffee first' made me laugh ;)

@Robin S thanks for your suggestions. I would give a try to the  Connect Page Fields & Ryans SQL query and see how can I fit in the keywords appearance.

1 person likes this

Share this post


Link to post
Share on other sites
6 minutes ago, MilenKo said:

Btw 'reading the morning coffee first' made me laugh

Oh well, plenty of mistakes I made this morning... But at least I made you laugh :D 

1 person likes this

Share this post


Link to post
Share on other sites

Hello again. After a while of being away it is time to renew my work and bring it to the end now.

I had some digging in google to search for any good approach that I can use for the tags cloud and I got a module that might work, however in the forum here there was a guess that it would overload the site at one point when 1000-5000 pages are added and some have 5-6 tags. As far as the speed of the load is a concern for me, I am still looking for a best approach to just get the most used 10 tags ordered and that is all. For the moment I have managed to setup the tags as pages and can use existing one or new ones so that is good. I am also needing to link the existing tags to a search result of all pages containing the tag but that should not be a problem and will just work it out.

So if anyone has a working example that does not overkill the system, would be good to share it. I looked into a few blog profiles to check about that, but am still not able to find my answer :) I am not going to give up and while being away I even started working on another personal project of mine (PW of course).

I am trying to modify Ryan's query suggested by @Robin S but am experiencing some difficulties, so should work a bit harder I guess :)

Share this post


Link to post
Share on other sites

You can always use the cache for time/resource demanding code and you can update it with a cron or hook so users never get long load times.

1 person likes this

Share this post


Link to post
Share on other sites
23 hours ago, MilenKo said:

I am trying to modify Ryan's query suggested by @Robin S but am experiencing some difficulties, so should work a bit harder I gues

What is causing you difficulty exactly?

Another example with a few more comments:

$table = $fields->get('tags')->getTable(); // enter the name of your "tags" Page field
$query = $database->query("SELECT data FROM $table");
$ids = $query->fetchAll(PDO::FETCH_COLUMN);
$count_values = array_count_values($ids); // count the frequency of values in the array
arsort($count_values); // sort highest to lowest
$count_values = array_slice($count_values, 0, 10, true); // we only want the top 10 tags
// use the pages IDs and counts as needed, for example:
foreach($count_values as $key => $value) {
    $p = $pages->get($key);
    // output whatever you want using $p (Page object) and $value (number of times tag is selected)
    echo "<p><a href='/search/?tag={$p->name}'>{$p->title}</a> (selected in $value pages)</p>";
}

And in your search template you could do something like:

$tag = $sanitizer->name($input->get->tag);
if($tag) {
    $results = $pages->find("tags.name=$tag");
    // output your results for pages with this tag
}

 

1 person likes this

Share this post


Link to post
Share on other sites

Just a small correction on @Robin S code:

If you're using PW 3.0+ will need to reference the PDO class outside ProcessWire namespace:

$ids = $query->fetchAll(\PDO::FETCH_COLUMN);

Or, put this in the beginning of the file:

<?php namespace ProcessWire;
use \PDO;

 

1 person likes this

Share this post


Link to post
Share on other sites

@fbg13 For sure the caching would speed up the page loading, however, in my development, I am not activating this as to avoid some style/coding issues. Once I know the functionality is all sorted out, I will activate the caching and cleanup of the code etc.

Thank you @Robin S and @Sérgio I will give it a try and see how it fits. Once I get a working example, every next project would be easier...

Share this post


Link to post
Share on other sites

OK. Testing out the @Robin S code made the tags cloud working on the main page. The only thing that I need to change is the order of the tags where I would need to have the most used ones to appear first. As of now, I am not sure how the tags are sorted but for sure the counter works fine. I need to find a way to sort the results by $value and it would all be good.

Tags cloud.jpg

Share this post


Link to post
Share on other sites
14 hours ago, Sérgio said:

If you're using PW 3.0+ will need to reference the PDO class outside ProcessWire namespace

I don't experience any issue with this when the ProcessWire namespace is not declared - the file compiler seems to be smart enough not to wrongly insert \ProcessWire\ before the PDO class. If the ProcessWire namespace is manually declared then you would need the backslash, \PDO::FETCH_COLUMN. I guess it wouldn't hurt to include the backslash in either case.

30 minutes ago, MilenKo said:

I need to find a way to sort the results by $value and it would all be good.

The code was missing an arsort() - I have updated it now.

2 people like this

Share this post


Link to post
Share on other sites

@Robin S Thank you, Sir! It worked like a charm and now the tags are sorted out properly. What is left would be to figure out the search query and see how to implement it in the theme.

Share this post


Link to post
Share on other sites

Hello @Robin S

I tried today to implement your suggested modification in the search.php however I got two results none of which is what is needed:

1. if I search for existing tag, I am shown the page with the tag name as title and if I click on it brings me to 404.

2. If I search for non-existing tag, I get twice the message that nothing is found (first time it shows because it is looking for a match in title|body and second time - in the tag).

From what I understood so far, the issue comes with the fact that the page title|body search would also make the tag available as far as it is also a page. I need to separate the two but so far I am unable to figure out how to implement the tag search separately from the title|body one.

I am attaching my original search.php code in case somebody have some time to suggest the fix or at least point me to the right direction.

Spoiler

<?php

/**
 * Search template
 *
 */

$out = '';

if($q = $sanitizer->selectorValue($input->get->q)) {

	// Send our sanitized query 'q' variable to the whitelist where it will be
	// picked up and echoed in the search box by the head.inc file.
	$input->whitelist('q', $q); 

	// Search the title, body and sidebar fields for our query text.
	// Limit the results to 50 pages. 
	// Exclude results that use the 'admin' template. 
	$matches = $pages->find("title|body~=$q, limit=10");  

	$count = count($matches); 

	if($count) {
		
		$found = "Found $count articles containing text <strong class='text-danger'>\"$q\"</strong>";

		foreach($matches as $m) {
			
			$date = date('Y-j-d, G:i', $m->created);
			$relative = wireRelativeTimeStr($m->created);
			$cat_link = $m->rootParent->url;
			$cat_title = $m->rootParent->title;
			
			//Search result header block
			$out .= "<article class='hentry'>" .
					"<header class='entry-header'>" .
					"<i class='fa fa-list-alt fa-2x fa-fw pull-left text-muted'></i>" .
					"<h2 class='entry-title h4'><a href='{$m->url}' rel='bookmark'>{$m->title}</a></h2>" .
					"</header>" .
					"<footer class='entry-footer'>" .
					"<div class='entry-meta text-muted'>" .
					"<span class='date'>" .
					"<i class='fa fa-clock-o fa-fw'></i>" .
					"<time datetime='$date'>$relative</time>" .
					"</span>" .
					"<span class='category'><i class='fa fa-folder-open-o fa-fw'></i> <a href='$cat_link'>$cat_title</a></span>" .
					"</div>" .
					"</footer>" . 
					"</article>";
		}

	} else {
		$found = "There are no records found in the database...";
		$out .= "</article>I am sorry for the inconvenience, however no matter how hard I tried digging deep in my database, there were no matches found matching <strong class='text-danger'>'$q'</strong> as a keyword. Maybe you could try to refine the search terms and try me again? <p><br />Another option would be to write down an <strong class='text-danger'>article, faq or news</strong> on the topic yourself so that the next search comes with a positive result <i class='fa fa-smile-o fa-1'></i></p>";
	}
	} else {
		$found = "I am missing a search term in the search box...";
		$out .= "</article>In order to allow me to search the database and find some useful stuff I need to have some <strong class='text-danger'>search terms</strong>. Otherwise it would be just a pointless waste of mine and your time trying to pull some articles that are not important for your goals!";
}

// Note that we stored our output in $out before printing it because we wanted to execute
// the search before including the header template. This is because the header template 
// displays the current search query in the search box (via the $input->whitelist) and 
// we wanted to make sure we had that setup before including the header template. 

include ('./includes/header.php');
		
include ('./includes/breadcrumbs.php'); ?>
		
		<div id="main" class="site-main clearfix">
			<div class="container">
	
				<div class="content-area">
					<div class="row">

						<div id="content" class="site-content col-md-9">
						
							<header class="archive-header">
								<h1 class="archive-title"><?php echo $title;?></h1>
							</header><!-- .archive-header -->
							
							<blockquote class="archive-description">
								<p><?php echo $found;?></p>
							</blockquote><!-- .archive-description -->
							
							<div class="archive-list archive-article">

								<?php echo $out; ?>

							</div><!-- .archive-list -->

						</div><!-- #content -->

<?php include ('./includes/sidebar.php');?>

					</div>
				</div><!-- .content-area -->
	
			</div>
		</div><!-- #main -->
		
<?php include ('./includes/footer.php');?>

 

Looking at the code further, it is not clear how I would need to organize the query so that I can search for tags and page title|body text using the same query. For the moment anything I search within the search form on the main page has the structure: localhost/search/?q=enzymes

Share this post


Link to post
Share on other sites
17 hours ago, MilenKo said:

Looking at the code further, it is not clear how I would need to organize the query so that I can search for tags and page title|body text using the same query.

Do you need to search for both using the same query? The title|body search is coming from user input, the tag search is coming only from links that you are outputting in your tag cloud. So you can treat these as entirely separate selectors:

$tag = $sanitizer->name($input->get->tag);
$q = $sanitizer->selectorValue($input->get->q));
if($tag) {
    $matches = $pages->find("tags.name=$tag, limit=10"); // assuming your tags field is named "tags"
    // output your matches for pages with this tag
} elseif($q) {
    $matches = $pages->find("title|body~=$q, limit=10");
    // output your matches for the search query
}

You don't have to do these in the same template even - you could create a different template and page for listing tag matches if you prefer to separate them like that. In any case you would need to use separate markup for tag results than search results because some of your results output doesn't make sense for a tag search...

// ...

$found = "Found $count articles containing text <strong class='text-danger'>\"$q\"</strong>";

// ...

$found = "I am missing a search term in the search box...";

 

2 people like this

Share this post


Link to post
Share on other sites

@Robin S If I am aiming to extend the search to title|body and tags, would that make sense as the first two are fields containing just a text input where the tags are pages. It would be nice to make the search form to search for a text string within the title, body and tags field however I am not sure how easy that is to achieve because of the fields differences.

I thought your example was to be added to the search form however started understanding your point - to use the query to link the top X tags and link them to the pages only in the tag cloud. In such a scenario, I need to find the relation between the tag cloud template and the results showing in the same structure as Articles. But will see how it goes.

One thing I was thinking also, would it be easier to have the tags as a text line and separate them by coma? Doing so should allow me to have the search easily modified by just changing the $matches to search in title|body|tags. As to show the cloud, it might not be really necessary even though I am sure I could grab the tags of every page again with some modifications to the @Robin S code but that would require to use explode to extract every tag from the text.

 

Share this post


Link to post
Share on other sites
3 hours ago, MilenKo said:

It would be nice to make the search form to search for a text string within the title, body and tags field however I am not sure how easy that is to achieve because of the fields differences.

There's no harm in just trying these things. ;)

$matches = $pages->find("title|body|tags~=$q, limit=10");

 

Share this post


Link to post
Share on other sites

Ok. I tried to implement your last suggestion as I really liked the approach, however for some reason the IF statement does not work for me. To simplify the things, I created a simple search.php file containing the following code (please note that my tags field is called keywords. Same thing applies for template and page container):

<?php

/**
 * Search template
 *
 */

$out = '';

$keywords = $sanitizer->name($input->get->keywords);
$q = $sanitizer->selectorValue($input->get->q);

if($keywords) {
    $matches = $pages->find("keywords.name=$keywords, limit=10"); // assuming your tags field is named "tags"
    // output your matches for pages with this tag
	echo "Tag Match";
} elseif($q) {
    $matches = $pages->find("title|body~=$q, limit=10");
    // output your matches for the search query
	echo "Title|Body Match";
	}
?>

So I browsed the main page and searched for a keyword that I am 100% sure it is used for page. So far the result was: Title|Body Match , even though I do not have any page title or body content with the same keyword. Am I missing something here?

Share this post


Link to post
Share on other sites

To refresh your understanding of GET variables, see this tutorial: http://html.net/tutorials/php/lesson10.php

$input->get is a PW-specific way of retrieving GET variables but it's essentially the same as the native PHP $_GET.

So these two lines...

$keywords = $sanitizer->name($input->get->keywords);
$q = $sanitizer->selectorValue($input->get->q);

...look for GET variables in the query string named "keywords" and "q", and then pass their values through a sanitizer. The result is assigned to variables $keywords and $q.

And these two lines...

if($keywords) {
//...
if($q) {
//...

...check to see if the variables are "truthy": that is, if they evaluate as true when converted to a boolean.

You are seeing "Title|Body Match" but this does not mean there actually is a title or body match - your if($q) test is passed so long as $q is not empty.

And also consider that if($keywords) can never be true if there is no "keywords" variable present in your query string.

1 person likes this

Share this post


Link to post
Share on other sites

@Robin S I decided to redo the tags again as it only takes a few steps to achieve that. So the first thing to try again was to include the keywords in $matches as I knew it is all working fine but to show keywords results. And suddenly, I can see both results correctly - the pages matching the text in title, body and those, matching keywords. I am not aware why it did not work at first place but my thoughts are that for different tests I might have changed a field, template or page from keywords to tags.

Now I need to only exclude the Keywords pages itself from the selectors query and it is all completed.

Thank you @Robin S mostly for your patience and simple solutions. It meant a lot to me to have a working first theme the way I like it as any other one that would follow will match in one way or the other what I already have.

Now I only have to dive in to selectors and find the way to exclude something from the query. That should not be a problem (I guess ;) ).

Share this post


Link to post
Share on other sites

Alright, we got it all sorted out now using the following query: 

$matches = $pages->find("template!=keywords,title|body|keywords~=$q, limit=10");

where !=keywords is to exclude any page using "keywords" as template and |keywords is the name of the field used to contain the tags.

I am super happy now as the cloud works fine sorting out the used tags by most used (which I needed) and the search page shows any result that contains the search text in title, body and keywords. Now I will only have to modify the text shown if no results are found to be suitable and that is all ;)

Share this post


Link to post
Share on other sites

For those who might be looking for a similar solution, here is my search php that is all done now.

Spoiler

<?php

/**
 * Search template
 *
 */

$out = '';

if($q = $sanitizer->selectorValue($input->get->q)) {

	// Send our sanitized query 'q' variable to the whitelist where it will be
	// picked up and echoed in the search box by the head.inc file.
	$input->whitelist('q', $q); 

	// Search the title, body and sidebar fields for our query text.
	// Limit the results to 50 pages. 
	// Exclude results that use the 'admin' template. 
	//$matches = $pages->find("title|body~=$q, limit=10");  
	$matches = $pages->find("template!=keywords,title|body|keywords~=$q, limit=10");

	$count = count($matches); 

	if($count) {
		
		$found = "Found $count articles containing text <strong class='text-danger'>\"$q\"</strong>";

		foreach($matches as $m) {
			
			$date = date('Y-j-d, G:i', $m->created);
			$relative = wireRelativeTimeStr($m->created);
			$cat_link = $m->rootParent->url;
			$cat_title = $m->rootParent->title;
			
			//Search result header block
			$out .= "<article class='hentry'>" .
					"<header class='entry-header'>" .
					"<i class='fa fa-list-alt fa-2x fa-fw pull-left text-muted'></i>" .
					"<h2 class='entry-title h4'><a href='{$m->url}' rel='bookmark'>{$m->title}</a></h2>" .
					"</header>" .
					"<footer class='entry-footer'>" .
					"<div class='entry-meta text-muted'>" .
					"<span class='date'>" .
					"<i class='fa fa-clock-o fa-fw'></i>" .
					"<time datetime='$date'>$relative</time>" .
					"</span>" .
					"<span class='category'><i class='fa fa-folder-open-o fa-fw'></i> <a href='$cat_link'>$cat_title</a></span>" .
					"</div>" .
					"</footer>" . 
					"</article>";
		}

	} else {
		$found = "There are no records found in the database...";
		$out .= "</article>I am sorry for the inconvenience, however no matter how hard I tried digging deep in my database, there were no matches found matching <strong class='text-danger'>'$q'</strong> in title, body text and keywords. Maybe you could try to refine the search terms and try me again? <p><br />Another option would be to write down an <strong class='text-danger'>article, faq or news</strong> on the topic yourself so that the next search comes with a positive result <i class='fa fa-smile-o fa-1'></i></p>";
	}
	} else {
		$found = "I am missing a search term in the search box...";
		$out .= "</article>In order to allow me to search the database and find some useful stuff I need to have some <strong class='text-danger'>search terms</strong>. Otherwise it would be just a pointless waste of mine and your time trying to pull some articles that are not important for your goals!";
}

// Note that we stored our output in $out before printing it because we wanted to execute
// the search before including the header template. This is because the header template 
// displays the current search query in the search box (via the $input->whitelist) and 
// we wanted to make sure we had that setup before including the header template. 

include ('./includes/header.php');
		
include ('./includes/breadcrumbs.php'); ?>
		
		<div id="main" class="site-main clearfix">
			<div class="container">
	
				<div class="content-area">
					<div class="row">

						<div id="content" class="site-content col-md-9">
						
							<header class="archive-header">
								<h1 class="archive-title"><?php echo $title;?></h1>
							</header><!-- .archive-header -->
							
							<blockquote class="archive-description">
								<p><?php echo $found;?></p>
							</blockquote><!-- .archive-description -->
							
							<div class="archive-list archive-article">

								<?php echo $out; ?>

							</div><!-- .archive-list -->

						</div><!-- #content -->

<?php include ('./includes/sidebar.php');?>

					</div>
				</div><!-- .content-area -->
	
			</div>
		</div><!-- #main -->
		
<?php include ('./includes/footer.php');?>

 

 And here is the sidebar.php code related to the tag cloud that makes the keywords in the cloud showing the search results:

Spoiler

$table = $fields->get('keywords')->getTable(); // 'keywords' contains the name of my Page field
$query = $database->query("SELECT data FROM $table");
$ids = $query->fetchAll(\PDO::FETCH_COLUMN);
$count_values = array_count_values($ids); // count the frequency of values in the array
arsort($count_values); // sort highest to lowest
$count_values = array_slice($count_values, 0, 20, true); // we only want the top 20 tags
// use the pages IDs and counts as needed, for example:
foreach($count_values as $key => $value) {
$p = $pages->get($key	);
// output whatever you want using $p (Page object) and $value (number of times tag is selected)
echo "<a href='/search/?q={$p->name}' class='btn btn-tag btn-xs'>{$p->title}-$value</a>";
}

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Max Allan Niklasson
      Hi, I think this is my first topic, even though I've been working with PW a few years. But now, I'm trying to restructure my way of coding, cause many templates (like activities for birding societies) are re appearing in multiple different websites. Since this, I've been working on redo this into a module, but as far as I have read I cannot store the templates (related to specific module) in the module's folder. It has to be in the templates folder?
       
    • By VirtuallyCreative
      Hello!

      I'm currently trying to create a navigation menu using list items and I'm having issues pulling children pages properly and I'm hoping someone can point me in the right direction.
      The code below was modified from the default (intermediate) template that outputs child pages of the main page. (Home -> About, SiteMap).

      But one of the children (About page), also has 3 child pages and I'm not sure how to also get those 3 additional child pages to display as well within the same foreach statement. Because of the way the menu is structured I would need to change the output of the HTML for any Child Page with additional Children (it nests underneath in the nav).
      Currently only Home, About and Sitemap appear and I want to also include the child pages of About nested properly within the navigation.
       
       Current code, only accounting for Homepage and it's children. Works great and as expected:
      Home About Sitemap <!-- START SIDEBAR MENU --> <div class="sidebar-menu"> <!-- BEGIN SIDEBAR MENU ITEMS--> <ul class="menu-items"> <?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { echo "<li class=''><a href='$item->url'><span class='title'>$item->title</span>"; // Grab first two letters of page to output for menu icon and set active class if($item->id == $page->rootParent->id) { echo "</a><span class='bg-success icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } else { echo "</a><span class='icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } } ?> </ul> <div class="clearfix"></div> </div> <!-- END SIDEBAR MENU -->  
      Modified not working markup trying to also nest children of a child:
      Home About Page1 Page2 Page3 SiteMap <!-- START SIDEBAR MENU --> <div class="sidebar-menu"> <!-- BEGIN SIDEBAR MENU ITEMS--> <ul class="menu-items"> <?php // top navigation consists of homepage and its visible children foreach($homepage->and($homepage->children) as $item) { echo "<li class=''><a href='$item->url'><span class='title'>$item->title</span>"; // check if a top navigation item's visible children has child pages // if true, change markup of top navigation item to account for nested children if(($homepage->children)->hasChildren()) { //change menu item to menu item /w sub-items echo "<li class=''><a href='javascript:;'><span class='title'>$item->title</span> <span class='arrow'></span></a><span class='icon-thumbnail'><i class='pg-form'></i></span>"; //loop through the top navigation child's children pages and output them as nested menu item foreach($child->children as $childitem) { echo "<ul class='sub-menu'>"; echo "<li class=''><a href='$childitem->url'>$childitem->title</a>"; echo "</a><span class='icon-thumbnail'>"; echo substr($childitem->title, 0, 2); echo "</span></li></ul></li>"; } } //step back out and continue listing Homepage Children pages if($item->id == $page->rootParent->id) { echo "</a><span class='bg-success icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } else { echo "</a><span class='icon-thumbnail'>"; echo substr($item->title, 0, 2); echo "</span></li>"; } } ?> </ul> <div class="clearfix"></div> </div> <!-- END SIDEBAR MENU --> Any insights would be appreciated! I'm also sure the php code itself can be refactored better but still learning for now.

    • By DarsVaeda
      I enabled language support and now I get "Trying to get property of non-object" for lines like:
      <p><?= $page->text ?></p> The content is still available in the backend. On another page I get text from the frontpage with:
      <?php $somepage = $pages->get(1); ?> ... <p><?= $somepage->text ?></p> This outputs the text although on the frontpage it doesn't. I also do this on the header. On the frontpage I added some fields that are thus "shared" among all pages the content fails with the error for `<?= $page->text ?>` but not for `<?= $pages->get(1)->text ?>`.
      On a third page everything works as expected 
      All three pages have different templates.
      Additionally if the field is wrapped with frontend editing like so:
      <p><edit text><?= $page->text ?></edit></p> The page source will end up like this:
      <p></edit></p> Before having to dig deep into this:
      Any idea what it could be? I var_dumped $page and that gives an object.
    • By DarsVaeda
      Say I have a field for an unordered list. I need to have such a list twice on the page with different list items.
      Ideally I would create one field that can take html and only allows for <ul> and <li>.
      I can add the field to another template.
      But it seems I can't add that field twice to a template or am I missing something?
    • By suntrop
      Hi all
      I am looking for a good solution to give my content area more variety. In output, think of the WordPress page builder plugins. I really like you can put together the content depending of what you want to say (visually). In other words, I don't like pages with one content column (text from top to bottom, maybe an image floated to the right, etc.). I know you can create different templates and use them. But still you are stuck to exactly those templates and their repetitive content flow.
      I had a look at the PageTable field and that was kind of what would be a good solution. I thought I create just content blocks (like a slider, accordion, two/three/four column block, parallax block, etc.) and put them on my pages together as I like. However, those blocks are stored as children and may interfere with actual children of that page, don't they?
      Any suggestions to get more rich content areas?