TOPIC:

echo title with php 11 months 1 week ago #237329

  • Topic Author
  • carla
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
The page is reachable again, but with jquery or javascript my email on that page doesn't get send at all. Within the email I echo the username like this:

<?php
$user =& JFactory::getUser();
echo $user->name; ?>

and that works great. I need the same for the title. Is there no way to just use php?

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

echo title with php 11 months 1 week ago #237332

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
Hey,

Please try this :
<?php return JFactory::getDocument()->getTitle(); ?>

Regards,
Mario

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

echo title with php 11 months 1 week ago #237333

  • Topic Author
  • carla
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Thank you so much. With your hint I got it to work. I used

<?php
$title =& JFactory::getDocument()->getTitle();
echo $title;
?>

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

echo title with php 11 months 1 week ago #237334

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
Hi,

Glad that we made it work :)

IF you have any other questions, let me know.

Regards,
Mario

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

echo title with php 11 months 1 week ago #237336

  • Topic Author
  • carla
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 36
  • Thanks: 0
Now that I notice how great this works :), could I just ask you, what if I want to get the contents of a field? So lets say the fieldname is mario. How would I change this code to get the content of the field mario? Would that be easy to do? Thanks so much for all the help!

<?php
$title =& JFactory::getDocument()->getTitle();
echo $title;
?>

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

echo title with php 11 months 1 week ago #237341

  • MarioPuco's Avatar
  • MarioPuco
  • Offline
  • Ultimate Breezer
  • Ultimate Breezer
  • Posts: 5958
  • Karma: 119
  • Thanks: 554
HI,

Please check this topic for some further info on how to get Joomla custom fields: crosstec.org/en/forums/3-breezingforms-f...onent-3x.html#226649

Now if you want to get a content of field mario made with BF this is not soooo simple since you will need to write a query for this field EXACTLY.
Check this : crosstec.org/en/forums/15-usage/94994-re....html?start=6#236569

You would only need to change setQuery to target what you exactly want in your DB.

Regards,
Mario

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

  • Page:
  • 1
  • 2
Time to create page: 0.053 seconds

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!