A
A
Anton2019-05-28 15:36:00
PHP
Anton, 2019-05-28 15:36:00

How to fix Using $this when not in object context?

An example from Bitrix

<h1><?=$APPLICATION->ShowTitle();?><?$APPLICATION->ShowViewContent('news_detail');?></h1>
<?$this->SetViewTarget('news_detail');?>
   <noindex><a rel="nofollow" class="h1-head fancy" href="/develop/change_cover_type.php"><?=$arDataFilter["NAME"]?></a></noindex>
<?$this->EndViewTarget();?>

Issues
[Error]
Using $this when not in object context (0)

There is more likely something to do with php and $this ....
Tell me

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2019-05-28
@anton99zel

Looked at the solution and did this:

<?$APPLICATION->ShowViewContent('mycontent');?>
<?$APPLICATION->AddViewContent('mycontent', 'Здесь текст');?>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question