How to change layout of Com_Nexevo_Contact

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 7:06 am

Hi ! I need to change layout of component "contact form" - Com_Nexevo_Contact, and I want to add some classes , or at all delete all classes and write my own. But I don't know how to, please see the picture, which I attached, and what I mean. Thanks in advance !


Image

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 730
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to change layout of Com_Nexevo_Contact

Post by effrit » Thu Dec 14, 2017 7:16 am

hi.
try override the template output for this component.
go to Templates - Templates, Current_Template Details and Files

go to 'Create override' tab, search your component and make override for it.
after this you can find file in your template folder ->html -> com_nexevo_contact
open it in text editor like notepad++ and search classes you want to delete.

as alternative, i think you can just override css rules for "problem" classes in .css file.

Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

Re: How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 7:26 am

Thanks for reply ! Yes, I overrided, but no html folder

Image


Then I look in the folder mod_nexevocontact, maybe there anything, for example in tmpl folder -> default php, but nothing

Image

Image

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 730
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to change layout of Com_Nexevo_Contact

Post by effrit » Thu Dec 14, 2017 7:32 am

Template folder here

root_site_folder\templates\YOUR_TEMPLATE_NAME\

Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

Re: How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 7:46 am

Yes I know where template folder ! But there only 1 file default.php with code

Code: Select all

<?php defined("_JEXEC") or die('Restricted access');
/**

 @Nexevo Responsive Conact Form             
 @author Nexevo Technologies <info@nexevo.in>    
 @link http://www.Nexevo.in 
 @copyright (C) 2010 - 2011 Nexevo-Extension      
 @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html

**/
?>
<a name="cid_<?php echo $this->menu_id ?>"></a>

<div
	id="nexevocontainer_c<?php echo $this->menu_id ?>"
	class="nexevocontainer<?php echo $this->cparams->get('pageclass_sfx') ?>">
	
	<?php if ($this->cparams->get('show_page_heading')) : ?>
		<h1><?php echo $this->escape($this->cparams->get('page_heading')) ?></h1>
	<?php endif ?>

	<?php if (!empty($this->page_subheading)) : ?>
		<h2><?php echo $this->page_subheading ?></h2>
	<?php endif ?>

	<?php $this->MessageBoard->Display() ?>

	<?php if (!empty($this->FormText)) : ?>
		<form enctype="multipart/form-data"
				id="nexevo_form_c<?php echo $this->menu_id ?>"
				name="nexevo_form_c<?php echo $this->menu_id ?>"
				class="nexevo_form nexevoform-<?php echo $this->cparams->get("form_layout", "extended") ?>"
				method="post"
				action="<?php echo(JFactory::getApplication()->input->server->get("REQUEST_URI", "", "string") . "#cid_" . $this->menu_id) ?>">
			<!-- <?php echo "com_" . $this->_name . " " . (string)$this->xml->version . " " . (string)$this->xml->license ?> -->
			<?php echo $this->FormText ?>
		</form>
	<?php endif ?>
</div>

Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

Re: How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 7:50 am

In overrided folder com_nexevocontact

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 730
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to change layout of Com_Nexevo_Contact

Post by effrit » Thu Dec 14, 2017 8:02 am

seems like this is all you can get without modify component files (this is bad becouse you will lost your implementations after update).

the code you looking for is in $this->FormText.
try duplicate
<?php echo $this->FormText ?>

so you can replace classes via str_replace function

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 730
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to change layout of Com_Nexevo_Contact

Post by effrit » Thu Dec 14, 2017 8:05 am

try this

Code: Select all

<?php echo str_replace("control-group", "my-class1 my-class2", $this->FormText);?>
instead of

Code: Select all

<?php echo $this->FormText ?>

Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

Re: How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 8:33 am

Yes, works very good ! Thank you !
Image

In this div class in the same place child class div class="controls", how can I change it ? Or I can to change by this method only main div ?

Can I change it <?php echo str_replace("controls", "my-class1 my-class2", $this->FormText);?>

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 730
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to change layout of Com_Nexevo_Contact

Post by effrit » Thu Dec 14, 2017 8:45 am

Code: Select all

<?
$myform = str_replace("control-group", "my-class1 my-class2", $this->FormText);
$myform = str_replace("controls", "my-class3", $myform);
echo $myform;
?>
Last edited by effrit on Thu Dec 14, 2017 9:33 am, edited 1 time in total.

Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

Re: How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 9:10 am

Code: Select all

<?php if (!empty($this->FormText)) : ?>
		<form enctype="multipart/form-data"
				id="nexevo_form_c<?php echo $this->menu_id ?>"
				name="nexevo_form_c<?php echo $this->menu_id ?>"
				class="nexevo_form nexevoform-<?php echo $this->cparams->get("form_layout", "extended") ?>"
				method="post"
				action="<?php echo(JFactory::getApplication()->input->server->get("REQUEST_URI", "", "string") . "#cid_" . $this->menu_id) ?>">
			<!-- <?php echo "com_" . $this->_name . " " . (string)$this->xml->version . " " . (string)$this->xml->license ?> -->
			<?php 
				$myform = str_replace("control-group", "my-class1 my-class2", $this->FormText);
				$myform = str_replace("controls", "my-class3", $this->$myform);
				echo $this->$myform; 
			?>
		</form>
	<?php endif ?>

Received blank page (((

checked the code several times ...


Image

User avatar
effrit
Joomla! Guru
Joomla! Guru
Posts: 730
Joined: Sun Nov 12, 2017 2:21 pm
Location: middle of Russia
Contact:

Re: How to change layout of Com_Nexevo_Contact

Post by effrit » Thu Dec 14, 2017 9:36 am

i edited code, try again

Giorgi_964758
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 102
Joined: Mon Mar 27, 2017 5:05 pm

Re: How to change layout of Com_Nexevo_Contact

Post by Giorgi_964758 » Thu Dec 14, 2017 9:40 am

Yes, works good without $this. Many thanks ! Why because of $this was problem ?


Post Reply

Return to “Extensions for Joomla! 3.x”