18 require_once SQ_CORE_PACKAGE_PATH.
'/content_type/content_type.inc';
43 $this->_ser_attrs = TRUE;
44 parent::__construct($assetid);
59 SQ_LINK_NOTICE => Array(
78 $link = $GLOBALS[
'SQ_SYSTEM']->am->getLink($this->
id, SQ_LINK_NOTICE,
'', TRUE,
'nested_asset');
94 $link = $GLOBALS[
'SQ_SYSTEM']->am->getLinkById($linkid);
95 if ($link[
'value'] ==
'nested_asset') {
96 return translate(
'cms_ct_nest_content_link_desc');
138 if (!isset($this->_tmp[
'edit_fns'])) {
141 $bodycopy_div_id = array_keys($GLOBALS[
'SQ_SYSTEM']->am->getParents($this->id,
'bodycopy_div', TRUE));
142 if (!empty($bodycopy_div_id)) {
143 $bodycopy_div = $GLOBALS[
'SQ_SYSTEM']->am->getAsset($bodycopy_div_id[0]);
144 $bodycopy_div_edit_fns = $bodycopy_div->getEditFns();
145 $all_context = $GLOBALS[
'SQ_SYSTEM']->getAllContexts();
146 foreach ($all_context as $context_id => $info) {
147 $GLOBALS[
'SQ_SYSTEM']->changeContext($context_id);
148 $bodycopy_div_edit_fns->generateContentFile($bodycopy_div);
149 $GLOBALS[
'SQ_SYSTEM']->restoreContext();
154 return parent::linksUpdated();
168 $nested_asset = $edit_fns->_getNestedAsset($this);
169 $asset_link = $GLOBALS[
'SQ_SYSTEM']->am->getAssetURL($nested_asset->id);
171 if (empty($asset_link)) {
172 $asset_link = strip_url(current_url(FALSE, TRUE)).
'/?a='.$nested_asset->id;
174 $content =
'<strong>'.translate(
'cms_ct_nest_content_nested_content').get_asset_tag_line($nested_asset->id).
'</strong> <a href="'.$asset_link.
'" id="sq_preview_new_window" target="_blank">'.translate(
'cms_ct_nest_content_click_to_preview').
'</a>.';