How to add a New View to your Joomla 3 Component?

> Please create a new view’s folder: 

/components/helloworld/views/howdyfriends

we have named this view howdyfriends

> Please Create a new HTML version of the view: 

/components/helloworld/views/howdyfriends/view.html.php

<?php // No direct access to this file defined('_JEXEC') or die('Restricted access'); // import Joomla view library jimport('joomla.application.component.view'); /** * HTML View class for the HowdyFriends view */ class HelloWorldViewHowdyFriends extends JViewLegacy { // Overwriting JView display method function display($tpl = null) { // Assign data to the view $this->msg = 'Howdy Friends, welcome to component development!'; // Display the view parent::display($tpl); } }

> Please Create a “templates” folder: 

/components/helloworld/views/howdyfriends/tmpl

> Please Create a default template file: 

/components/helloworld/views/howdyfriends/tmpl/default.php

<?php // No direct access to this file defined('_JEXEC') or die('Restricted access'); ?> <h1><?php echo $this->msg; ?></h1>
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to Enable Two Factor Authentication in Joomla 3.5?

> Please login to Joomla admin dashboard > You will have a notification, please click on...

How to Change an Article Category in Joomla 3.5?

> Please login to your Joomla 3.5 Admin Dashboard > Please go to Content > click...

How to Create a New Category in Joomla 3.5?

> Please login to Joomla 3.5 Admin Dashboard > Please click on the Content > Catagory...

How to Create a New Article in Joomla 3.5?

> Please login to your Joomla 3.5 Admin Dashboard > Please Click Content > Articles...

How to Log in to your Joomla 3.5 Dashboard?

> Please navigate your site with "/administrator", for e.g. domain.com/administrator >...

Powered by WHMCompleteSolution