Skip to content

Instantly share code, notes, and snippets.

@mr-fan
Forked from somatonic/get_field_settings.php
Created June 15, 2014 22:12
Show Gist options
  • Save mr-fan/31ac72af70790fbb07c4 to your computer and use it in GitHub Desktop.
Save mr-fan/31ac72af70790fbb07c4 to your computer and use it in GitHub Desktop.
<?php
// via field settings
$field = $fields->get("title");
echo "width:" . $field->columnWidth;
// via template context
$tpl = $templates->get("basic-page");
$field = $tpl->fieldgroup->getField("title", true);
echo "width:" . $field->columnWidth;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment