CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11886] Search: include module and modulerecord fields for content pages

avatar
Created By: Ruud van der Velden (ruudvdvelden)
Date Submitted: 2018-09-08 10:09

Assigned To:
Resolution: Won't Fix
State: Open
Summary:
Search: include module and modulerecord fields for content pages
Detailed Description:
In the result template of the Search Module neither the module nor the
modulerecord fields are available for entries of content pages.

It would be nice to fill those fields for content page results too.

\modules\Search\action.dosearch.php
line 158 vs line 198/199

Example use case:
When someone wants to display a summary of a content block from the specific
page he needs to know at least it's coming from a content page and the id of
that page.

History

Comments
avatar
Date: 2018-09-22 10:42
Posted By: Robert Campbell (calguy1000)

In the current configuration of search, the ModuleName and ModuleRecord fields
are only set for modules.

Therefore if they are not set it is for a content page... and you have the page
alias/name so you can use the {page_attr} or other plugins to extract content
blocks for content pages and do things with them.


      
avatar
Date: 2018-09-22 14:23
Posted By: Matt Hornsby (DIGI3) (DIGI3)

When a Content page is found, the $results array contains:
[url]
[urltext]
[title]
[intweight]
[weight]

But doesn't have the alias or ID of the page in which the results are returned.
{page_attr} requires one of these, so it's not clear how you would obtain the
content (short of using ajax on $entry->url or something)
      
Updates

Updated: 2018-09-22 10:42
resolution_id: => 8