Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / How to show HTML content in side bar? Thanks.

How to show HTML content in side bar? Thanks.

Views: 1,487

Results 1 to 18 of 18
22 Sep 2011, 9:02 PM
#1
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

How to show HTML content in side bar? Thanks.

Hi folks,

I want to embed something like HTML content into my side column, I know there is a sidebox, but how do I display HTML content directly? without user has to click a link to open it in another window?

I use lots of this in WordPress, there you can easily embed any HTML content in text widget. How do I do this in Zen Cart?

Thank you very much.

22 Sep 2011, 11:02 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to show HTML content in side bar? Thanks.

Get the Blank Sidebox mod from Free Addons. If you don't want it to look like other sideboxes, you can hide the heading and borders with CSS.

23 Sep 2011, 1:06 AM
#3
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

gjh42:

Get the Blank Sidebox mod from Free Addons. If you don't want it to look like other sideboxes, you can hide the heading and borders with CSS.

Can you please elaborate it? Where can I get a Blank Sidebox mod from Free Addons?:frusty:

This is my first time using Zen Cart. :oops:

Thank you very much.:hug:

23 Sep 2011, 1:10 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to show HTML content in side bar? Thanks.

Free Software Addons link at top of this page.

Blank Sidebox

And you should be reading the tutorials on templates and customization before starting work.

23 Sep 2011, 1:29 AM
#5
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

gjh42:

Free Software Addons link at top of this page.

Blank Sidebox

And you should be reading the tutorials on templates and customization before starting work.

Thank you!

I downloaded the addon, and made some changes to create my own HTML content, basically I want to have a clustermap on the right hand side instead of current footer position.

I made my modification based on this post:
http://www.zen-cart.com/forum/showthread.php?t=115006

But where else should I make setting change? maybe in Admin somewhere?

Can you tell me more details on how to do this?

Thank you very much in advance

BTW: here is my site: http://www.xiexianhui.com/food/

23 Sep 2011, 2:55 AM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to show HTML content in side bar? Thanks.

One tutorial: How do I remove and/or re-arrange the sideboxes? But it's not clear what you have already done and what you might have missed.

23 Sep 2011, 3:31 PM
#7
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

gjh42:

Free Software Addons link at top of this page.

Blank Sidebox

And you should be reading the tutorials on templates and customization before starting work.

I still need somebody to help me out :frusty:

this is my site:
http://www.xiexianhui.com/food/

I am trying to add a cluster map to the website, I created a ezpage and put it on the right side, but it shows only as a link, I want the map be displayed there, the map is basically a HTML code:

<a href="http://www4.clustrmaps.com/user/6b2e433d"><img src="http://www4.clustrmaps.com/stats/maps-no_clusters/www.xiexianhui.com-thumb.jpg" alt="Locations of visitors to this page" />
</a>

Can someone please tell me how to do this? The more detailed the better, Zen Cart is so powerful and so complex to new zenner like me, there is a learning curve but I do want my site be up and running as early as possible.

Thanks.

23 Sep 2011, 3:58 PM
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How to show HTML content in side bar? Thanks.

An ez-page will not display directly in a sidebox. You need to add the actual cluster map code to the blank sidebox file. Follow the Blank Sidebox instructions, which are very simple. If there is some part of that which gives you a problem, tell us exactly what you have done.

23 Sep 2011, 6:54 PM
#9
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

gjh42:

An ez-page will not display directly in a sidebox. You need to add the actual cluster map code to the blank sidebox file. Follow the Blank Sidebox instructions, which are very simple. If there is some part of that which gives you a problem, tell us exactly what you have done.

I still couldn't make it working, here is what I did to the Blank Side Box:

This is what I put in the /public_html/food/includes/languages/english/extra_definitions/blank_sidebox_defines.php

<?php define('BOX_HEADING_BLANK_SIDEBOX', 'POE Clocks'); define('TEXT_BLANK_SIDEBOX', ''); ?>

This is what I put in the /public_html/food/includes/templates/aberdeen_neutral/sideboxes/tpl_blank_sidebox.php

<?php $content = ''; $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">'; $content .= '<p>' . TEXT_BLANK_SIDEBOX . '</p>'; $content .= '<p><a href="http://www4.clustrmaps.com/user/6b2e433d"><img src="http://www4.clustrmaps.com/stats/maps-no_clusters/www.xiexianhui.com-thumb.jpg" alt="Locations of visitors to this page" /> </a> </p>'; $content .= '</div>'; Thank you again for your kind help. It would be greatly appreciated if you can post your website's coding here.
24 Sep 2011, 11:04 AM
#10
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to show HTML content in side bar? Thanks.

Your code works here. www .stevesh.org

25 Sep 2011, 1:48 AM
#11
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

stevesh:

Your code works here. www .stevesh.org

Can you please tell me the other settings? I must have missed something somewhere!!!

Maybe can you tell me what's your setting in the following places?

Admin-> Tools: Layout Box Controller, Ez-pages,
Admin->Configuration-> Layout settings, EZ-Pages settings

Thank you very much.

25 Sep 2011, 11:55 AM
#12
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to show HTML content in side bar? Thanks.

Sorry - I'll be back.

25 Sep 2011, 12:11 PM
#13
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to show HTML content in side bar? Thanks.

Since the Blank Sidebox has nothing to do with EZ pages, those settings don't matter. Here's what I did:

Installed the mod.

Opened blank_sidebox_defines.php and replaced this code:
Replace this text with your HTML content. with your code, then saved the file to the proper override folder.

Then I opened tpl_blank_sidebox.php and removed this string, leaving the single quotes:

<p>You can include text, links, images, HTML markup and even PHP code</p>

Done.

25 Sep 2011, 2:38 PM
#14
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

stevesh:

Since the Blank Sidebox has nothing to do with EZ pages, those settings don't matter. Here's what I did:

Installed the mod.

Opened blank_sidebox_defines.php and replaced this code:
Replace this text with your HTML content. with your code, then saved the file to the proper override folder.

Then I opened tpl_blank_sidebox.php and removed this string, leaving the single quotes:

<p>You can include text, links, images, HTML markup and even PHP code</p>

Done.

Where did you put it? If it has nothing to do with the Ez-pages, There must be somewhere to set it in Admin-> Tools: Layout Box Controller
Admin->Configuration-> Layout settings

Maybe I did everything correct but forgot to turn on the display somewhere?

BTW: Can you please paste your modified files and their folders here.

Thank you very much.

25 Sep 2011, 2:59 PM
#15
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to show HTML content in side bar? Thanks.

If you installed the mod correctly, it will appear in Admin - Tools - Layout Boxes Controller.

I thought you said you had the box activated, but the image won't appear. A link to your site would help.

blank_sidebox_defines.php:

define('BOX_HEADING_BLANK_SIDEBOX', 'Blank Sidebox Header');
define('TEXT_BLANK_SIDEBOX', '<a href="http://www4.clustrmaps.com/user/6b2e433d"><img src="http://www4.clustrmaps.com/stats/maps-no_clusters/www.xiexianhui.com-thumb.jpg" alt="Locations of visitors to this page" />
</a>
');

tpl_blank_sidebox.php:

$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

// Replace the text and HTML tags between the apostophes on lines 19 and 20.
// Use as many or as few lines using this model as you need for your custom content.
// If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
// If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)
$content .= '' . TEXT_BLANK_SIDEBOX . '';
$content .= '';

$content .= '</div>';

25 Sep 2011, 6:16 PM
#16
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

stevesh:

Since the Blank Sidebox has nothing to do with EZ pages, those settings don't matter. Here's what I did:

Installed the mod.

Opened blank_sidebox_defines.php and replaced this code:
Replace this text with your HTML content. with your code, then saved the file to the proper override folder.

Then I opened tpl_blank_sidebox.php and removed this string, leaving the single quotes:

<p>You can include text, links, images, HTML markup and even PHP code</p>

Done.

stevesh:

If you installed the mod correctly, it will appear in Admin - Tools - Layout Boxes Controller.

I thought you said you had the box activated, but the image won't appear. A link to your site would help.

blank_sidebox_defines.php:

define('BOX_HEADING_BLANK_SIDEBOX', 'Blank Sidebox Header');
define('TEXT_BLANK_SIDEBOX', '<a href="http://www4.clustrmaps.com/user/6b2e433d"><img src="http://www4.clustrmaps.com/stats/maps-no_clusters/www.xiexianhui.com-thumb.jpg" alt="Locations of visitors to this page" />
</a>
');

tpl_blank_sidebox.php:

$content = '';
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';

// Replace the text and HTML tags between the apostophes on lines 19 and 20.
// Use as many or as few lines using this model as you need for your custom content.
// If you have a multilingual site define your text in the languages/YOUR_LANGUAGE/extra_definitions/blank_sidebox_defines.php and include it as shown in line 19.
// If your site is monolingual, you can put the text right here as shown on line 20 (and nobody will know!)
$content .= '' . TEXT_BLANK_SIDEBOX . '';
$content .= '';

$content .= '</div>';

Thank you very much, yes the Blank_side_box was not activated! I will play with it to see if it can work like text widget in Wordpress, hopefully yes.

27 Sep 2011, 1:46 AM
#17
mdivk avatar

mdivk

Zen Follower

Join Date:
Sep 2011
Location:
Toronto, Ontario, Canada
Posts:
290
Plugin Contributions:
0

Re: How to show HTML content in side bar? Thanks.

Although the clustermap is working now, however, it is set to show in the right side area. If I need to show a different HTML page like with YouTube in the main page area, how do I do that?

I know ezpage might do, but really confused by some posts in the forum, it would be great appreciated if someone can post a step-by-step tutorial!

27 Sep 2011, 11:03 AM
#18
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: How to show HTML content in side bar? Thanks.

Not exactly sure what you're asking, but it sounds like EZ pages are what you want. EZ pages are pretty simple and their content displays in the center section. I use them a lot.

https://www.zen-cart.com/tutorials/index.php?article=117