1. pat02
  2. Sherlock Holmes
  3. Commercial Templates
  4. Tuesday, 23 July 2019
  5.  Subscribe via email
Hello

If I edit an article in frontend, the whole layout an design is shown. This makes it hard to edit articles.

So I want to remove design. After the Body tag I use


<?php if($task == 'edit') : ?>

<div id="container_main">
<div class="wrapper960">
<?php require("inc/layouts/main.php"); ?>
</div>
</div>

<?php else : ?>

(here follows original template code)

<?php endif; ?>


But it's not working, because variable $task is empty if I edit an article. Shouldn't it hold value "edit" ?
Can you please check this?

Thanks a lot.

Patrick
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Patrick

This code appears to no longer function within Joomla. I have created an issue on the Joomla repo to try and get confirmation on this.

It has been mentioned elsewhere on the forum that the following plugin has been used for the purpose with success... https://extensions.joomla.org/extensions/extension/style-a-design/templating/editor-template/

Ciaran
  1. more than a month ago
  2. Commercial Templates
  3. # 1
Accepted Answer Pending Moderation
0
Votes
Undo
Hi Ciaran

Great, thanks. Let's see what they have to say :)

Thanks for the link. The Plugin seems to be pretty good!

Patrick
  1. more than a month ago
  2. Commercial Templates
  3. # 2
Accepted Answer Pending Moderation
0
Votes
Undo
I did some further testing an noticed PHP variable "edit" is working if editing modules:


<body class="site view-edit no-layout task-edit itemid-212">


But it's not working if editing articles:


<body class="site com_content">
  1. more than a month ago
  2. Commercial Templates
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!