CMS MADE SIMPLE FORGE

TinyMCE

 

[#10902] CMSMS linker plugin to optionally use Menu Text

avatar
Created By: Chris Taylor (chrisbt)
Date Submitted: 2016-02-15 17:06

Assigned To: Mathieu Muths (airelibre) (airelibre)
Resolution: None
State: Open
Summary:
CMSMS linker plugin to optionally use Menu Text
Detailed Description:
Would it be possible to optionally use a Pages 'Menu Text' rather than the Page
Title.

Page titles (most of our sites) tend to be filled with keywords. They are much
harder to read than the simple 'menu text'.

CMSMS v1 seemed to use the 'Menu Text' rather than the 'Page Title', so there
wasn't an issue.

Maybe it could be optional, or be based on the 'Content List Settings > Content
Field to Display in Name Column: '.


A question: is is possible to create a custom plugin to provide this
functionality. If so I dig a bit deeper.

Many thanks for this module. 

Chris

History

Comments
avatar
Date: 2016-07-04 10:10
Posted By: Chris Taylor (chrisbt)

It would be great if there was an option for cmslinker text (similar to 'Content
List Settings > Content Field to Display in Name Column'). Then a change,
something like, ...

 action.ajax_getpages.php approx line 50...

        foreach( $dbr as $row ) {
            if( $cmslinker_text=='Title' ) {
                $lbl = "{$row['content_name']} ({$row['id_hierarchy']})";
            } else {
$lbl = "{$row['menu_text']} ({$row['id_hierarchy']})";
            }
            $out[] = array('label'=>$lbl, 'value'=>$row['content_alias']);
        }


      
avatar
Date: 2016-11-08 13:45
Posted By: Chris Taylor (chrisbt)

Just in case you might consider adding this ;)

Here's a mod that will default to showing the 'title' in cmslinker text, but if
the preference for 'Content Field to Display in Name Column' is 'Menu Text' then
the cmslinkeris set to 'menu_text':

action.ajax_getpages.php approx line 46 ...

    if( is_array($dbr) && count($dbr) ) {
        // found some pages to match
        $out = array();
        // load the content objects
        // CT MOD 08Nov16
$nameField = 'content_name';   // Content Field to Display in Name
Column: 'title' (default)
        $CMmod = cms_utils::get_module('CMSContentManager');
if ( is_object($CMmod) &&
$CMmod->GetPreference('list_namecolumn')!='title' ) {
            $nameField = 'menu_text';
        }
        foreach( $dbr as $row ) {
            // CT MOD 08Nov16
            //$lbl = "{$row['content_name']} ({$row['id_hierarchy']})";
            $lbl = "{$row[$nameField]} ({$row['id_hierarchy']})";
            $out[] = array('label'=>$lbl, 'value'=>$row['content_alias']);
        }
        echo json_encode($out);
    }

Thanks for considering it.

Chris
      
Updates

Updated: 2016-07-04 10:11
resolution_id: => 5
assigned_to_id: 100 => 13536