Post by web.pi » Fri Dec 15, 2017 3:48 am

I want to create a row filled with a slideshow above another row. This one with two columns: one sidebar and other with main content. But nothing is working.
I have created a new file into catalog/view/theme/default/template/common named to "slideshow.twig". Inside it, I have put :

Code: Select all

<div class="row">
	<div id="content" class="col-sm-12">{{ content_top }}</div>
</div>
And changed "home.twig" to:

Code: Select all

{{ header }}
<div id="common-home" class="container">
	{{ slideshow }}
	<div class="row">
		{{ column_left }}
		{% if column_left and column_right %}
		{% set class = 'col-sm-6' %}
		{% elseif column_left or column_right %}
		 {% set class = 'col-sm-9' %}
		 {% else %}
		 {% set class = 'col-sm-12' %}
		 {% endif %}
		 <div id="content" class="{{ class }}">{{ content_bottom }}</div>
		 {{ column_right }}
	</div>
</div>
{{ footer }}
The problem is in controller/common. Inside home.php, I put this line:

Code: Select all

$data['slideshow'] = $this->load->controller('common/slideshow');
Before this one:

Code: Select all

$this->response->setOutput($this->load->view('common/home', $data));
And create a file named "slideshow.php" (just a copy and paste from home.php).

Doing that, the website load blank. Reverting the changes on home.php, the website load normally.

So, what I need put in slideshow.php to make this work? ??? :-\

Best regards,
Wanderson PJ


User avatar
Newbie

Posts

Joined
Fri Dec 15, 2017 3:15 am
Location - Sao Paulo, Brazil

Post by straightlight » Fri Dec 15, 2017 11:37 pm

Doing that, the website load blank.
No OC version posted. Please post the error / access logs from your webserver. The page goes blank because there's an hidden error showing which either your provider or your Opencart admin settings restricts on showing to the screen.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by web.pi » Sat Dec 16, 2017 3:13 am

Tks for replying.

Sorry for not informing the OC version. It's 3.0.2.0.

About the log, there are no errors recorded.

To test, I have add and remove the extra line in home.php, but no error was recorded.

Best regards,
Wanderson PJ


User avatar
Newbie

Posts

Joined
Fri Dec 15, 2017 3:15 am
Location - Sao Paulo, Brazil

Post by straightlight » Sat Dec 16, 2017 3:20 am

Have you checked the access logs aside of your error logs from your host console or from your root FTP - > access logs folder?

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by web.pi » Tue Dec 19, 2017 1:06 am

Now you comment, yes. Empty.

The blank page only happens after edit home.php. Inspecting the page via browser, doesn't show any error too.

But, I was able to solve my problem for now. Reverting everything to original and edit only home.twig via OC panel.

For now, I have accomplished what I want, so all good.
Last edited by web.pi on Tue Dec 19, 2017 3:07 am, edited 1 time in total.

Best regards,
Wanderson PJ


User avatar
Newbie

Posts

Joined
Fri Dec 15, 2017 3:15 am
Location - Sao Paulo, Brazil

Post by straightlight » Tue Dec 19, 2017 2:53 am

That's great. Although, in the future, you might want to use these extensions to debug your TWIG files:

- https://www.opencart.com/index.php?rout ... n_id=31419
- https://www.opencart.com/index.php?rout ... n_id=29835

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON
Who is online

Users browsing this forum: Axlagusti, niagato and 536 guests