Hi everyone,
I am using the version 1.12.0,
I have a page in mod/cmb/pages/ named 'play.php' with content:
<?php
elgg_require_js("cmb/cmb");
echo 'Hi <br/>';
cmb.js resides in mod/cmb/views/default/js/cmb, with content taken from tutorial:
define(function(require) {
var elgg = require('elgg');
var $ = require('jquery');
$('body').append(elgg.echo('hello_world'));
});
I request the url http://localhost/elgg/cmb/play, which was registered to display play.php file, but I don't t get 'hello_world' below 'Hi'.
What would be the reason for this problem?
I also make random change to elgg_require_js("cmb/cmb");, e.g. Change "cmb/cmb" to "sdsds/cmb" does not show any error!, change elgg_require_js("cmb/cmb"); to elgsdsdg_require_js("cmb/cmb"); displays "Call to undefined function ...".
I have enabled developer tools, disable the cache ...
Thank you for viewing this.
info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by RaĆ¼l Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- Steve Clay@steve_clay
Steve Clay - 0 likes
- Bui Van Thu@van7hu
Bui Van Thu - 0 likes
You must log in to post replies.You must output a full page using elgg_view_page(). Seems like everything else you're doing is correct.
Hi,
Thank you Steve Clay, I am new to elgg, so, this should be annoying you.