Skip to content

Instantly share code, notes, and snippets.

@uglyeoin
uglyeoin / DP Fields in nice columns.md
Last active December 5, 2017 23:53
Different ways to Print_r

Params but nice columns

echo "" . print_r($this->item->dpfields, true) . "";

// Get the whole Joomla! application if you're not already doing so.

$app = JFactory::getApplication();

You mean the particle itself or the particle configuration?
Particle configurations are saved in custom/config/outline-name/layout.yaml if you configured the particle in layout manager, or custom/config/default/particles if you configured them in particle defaults
<?php echo $this->item->jcfields[0]->value; ?>
## The number is the ID of the field NOT the number in the array
<?php echo $item->jcfields[JText::_('JCFIELDS_FIELDNAME')]->value; ?>
## FIELDNAME is the NAME of the field as you have saved it
## or turn core fields into names
## CSS
/* RESPONSIVE GOOGLE MAPS */
.googleMaps {
position: relative;
padding-bottom: 75%; // This is the aspect ratio
height: 0;
overflow: hidden;
}
.googleMaps iframe {
position: absolute;
<div style="font-size:11px;display:inline-block;float:right;opacity:.55;">
<div><b>details:</b></div>
<span class="label label-inverse">[<?php echo $this->error->getCode(); ?>] </span>
<span style="padding-left:1em;"><?php echo htmlspecialchars($this->error->getMessage(), ENT_QUOTES, 'UTF-8');?></span>
<div><?php echo $this->error->getFile(). ' <span style="padding-left:2em;font-size:.8em;opacity:.5;">line:</span><i>'.$this->error->getLine().'</i>'; ?></div>
</div>
<?php echo $displayData->dpfields; ?>
<?php
foreach ($displayData->dpfields as $field) { $this->item->dpfields; if ($field->id == 1) { echo $field->value; }}
?>
The reason I choose id == 1 is because that is the field in the array that I wanted to display at that point. If you wish to find out which number in the array to find your fields you can use
echo "<pre>" . print_r($this->item->dpfields, true) . "</pre>";
<?php
$field = array();
foreach ($MAILDATA as $DATA) {
$title[$DATA[_FF_DATA_NAME]] = $DATA[_FF_DATA_TITLE];
$value[$DATA[_FF_DATA_NAME]] = $DATA[_FF_DATA_VALUE];
}
echo $value["FROM"]
?>
@uglyeoin
uglyeoin / _responsive.scss
Last active October 12, 2019 00:51
A responsive SCSS file made for Gantry 5 templates. Add @import "responsive"; to the bottom of your custom.scss file. Place in the templates/template_name/custom/scss folder
/*========== Mobile First Responsive ==========*/
/* LARGE DESKTOP */
/* 1199.488px if default is 16px */
@media only all and (max-width: 74.938rem) {}
/* DESKTOP */
/* 959.08px */
@media only all and (max-width: 59.938rem) {}