By Joao Mimoso on Wednesday, 02 September 2015
Posted in General Issues
Replies 1
Likes 0
Views 595
Votes 0
Hi there,

i've been doing an app using the sample app you provide (textbook) and i have some issues to understand the behavior of the sequence of the pages.

I will explain.

My app will only work in the dashboard (not in profile) with some links in the sidebar....that will show some stuff (forms and graphics) in the main page (canvas).

In a MVC model type...the first page to be evoked is the CONTROLLER which is responsible to route to the correct VIEW which uses some MODEL right?

In easy social...we have...Controller, Views, Models , Themes and WIDGETS which makes me confused.

In the sample you provide (textbook app) the controller does NOTHING so i think the ENTRY POINT should be the WIDGET media/com_easysocial/apps/user/MYAPP/widgets/dashboard/view.html.php
since i used this tag in the XML file - <widget>true</widget>

I'm using the sidebarTop function which then calls

$theme->output( 'themes:/apps/user/MYAPP/dashboard/default' );

which i think it's calling the page in
media/com_easysocial/apps/user/MYAPP/themes/default/dashboard/default.php

Where does the VIEW goes in here? Im not using the VIEW and this is working...im able to see the links in the side bar of the dashboard.

Another thing. The links im showing in the side bar are created with

<?php echo FRoute::apps( array( 'layout' => 'canvas' , 'id' => $app->alias , 'uid' => $user->getAlias() , 'type' => SOCIAL_TYPE_USER ) ); ?>"



but everytime i click the links...i get this error:

Warning: include(PATH_REMOVED_BY_ME/media/com_easysocial/apps/user/MYAPP/themes/default/.php): failed to open stream: No such file or directory in PATH_REMOVED_BY_ME/administrator/components/com_easysocial/includes/template/template.php on line 290

the url which is called is

PATH_REMOVED_BY_ME/community/apps/canvas/MYAPP/user/917-admin

My question is...with this url, which page is called? The VIEW , THEMES or other?

Im really confused about this one..

Plz help me on this..since i've lost allready too much days on this.
Hey Joao,

Firstly, you need to understand that widgets are pretty similar to modules on Joomla. The only difference between a widget and a module is that widgets supplies information about the page that you are viewing and it also passes in the object that is being rendered.

Widgets should also be used only to display short information on the sidebar of the dashboard. I would strongly suggest that you take a look at the tasks app for user. See the folder /media/com_easysocial/apps/user/tasks/

It would give you a better idea on how to create a custom view within EasySocial. We don't strictly follow the MVC guide simply because your app is rendered by EasySocial and not Joomla. You can't have 2 concurrent Joomla MVC structure running at the same time.
·
Wednesday, 02 September 2015 23:17
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post