Support Forum

Every time that you post a problem, PLEASE add the Joomla and the extension's versions and revisions (for example: Joomla 3.3.6, Contact Enhanced 3.3.5), PHP version and Server's Operating System. If you only manage only one site it is easier if you edit your profile and just add that information to your signature. Don't forget to add a detailed description of the problem. If possible, write down all steps to simulate the problem.

Before submitting a new post, PLEASE make sure you are running the latest version, test in different browsers (IE, FF, Chrome,..) and clear Joomla and browser's cache after every change you make.

Also, most questions are already answered in our FAQ and in iFAQ and Contact Enhanced documentation pages.

Getting page title of K2 item in the subject line

13 years 5 months ago #4536 by hanzel15
In K2, item view, there is a e-mail fucntion (to send the page link to somebody)
Now i wanted to change the item.php view of the K2 item template, to give somebody the option to send a form/inquiry made by Contact enhanced instead.
So far so good, this works ok, but i also like to get the (item) page title as the subject automatically written in the subject. I can make it work, starting the local installed e-mail programm, but not by linking to a contact enhanced form.

in PHP to get the page title : <?php echo $this->item->title; ?>

Can anybody help?

with regards,

Hans Poelen

Please Log in or Create an account to join the conversation.

13 years 5 months ago #4538 by douglas
Dear Hans,

I sent a file to your email, upload it to [Joomla]/components/com_contact_enhanced.
Add the PHP line below to somewhere in your code (in item.php (K2)):
JRequest::setVar('subject',$this->item->title);

You might want to set the Subject Field to hidden and change the prefix;

Best regards,

Please Log in or Create an account to join the conversation.

13 years 5 months ago #4540 by hanzel15
Thanks for the quick solution, have to sort out where to put it exactly in the item.php, but again, thanks in advance

Please Log in or Create an account to join the conversation.

13 years 5 months ago #4541 by douglas
Dear Hans,

I don't know exactly how you made this integration work, but you probably can add this line of code right before this integration;

Also, it would be nice if you could share with us what and how exactly you did, so more people can use it in the future;

Sincere regards,

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum

Copyright © 2018 IdealExtensions.com. All Rights Reserved.

This site is not affiliated with or endorsed by the Joomla!™ Project. It is not supported or warranted by the Joomla!™ Project or Open Source Matters™. The Joomla!™ logo is used under a limited license granted by Open Source Matters™, the trademark holder in the United States and other countries.
We may collect your IP address and your browser's User Agent string while using our site for security reasons and deriving aggregate information (analytics). This information is retained for a minimum of 1 and a maximum of 24 months.
Feedback