How to retrieve filename from Custom Template Script Layout field of the Edit Menu Item?

Asked by jsherk on 2010-08-22

Is it possible to retrieve the filename that is set in the Custom Template Script Layout field of the Edit Menu Item?

Would like to know how to do this for both v2.8.1 and v3.


Question information

English Edit question
PHPDevShell Edit question
No assignee Edit question
Last query:
Last reply:
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Greg (gregfr) said : #2

oops sorry I missed this one... could you be more precise? what menu do you want to access? from where?

jsherk (jeff-forerunnertv) said : #3

I posted it here per our conversation on Google Grou[s here:

Go to System Management > Menu Admin > Manage Menus

Then pick any menu item and click on EDIT at the far right.

Now scroll all the way to bottom and the last field is Custom Template Script Layout.

I want to know if it's possible to retrieve the value in that field.


Greg (gregfr) said : #4

I paste my answer here:

Here's the catch: you can access everything by browsing the system

For example:

$nav = $this->navigation;
$here = $nav->currentMenuID();
$my_menu = $nav->navigation[$here];
$layout = $my_menu['layout'];

not really handy. I asked you to add a question on LP because I feel
there should be an API to avoid you to mess up with the system data.

Can you help with this problem?

Provide an answer of your own, or ask jsherk for more information if necessary.

To post a message you must log in.