Forums / General Questions / EzPage Internal or External links do NOT show up for me? What am I doing wrong?

EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Locked

Views: 3,219

Results 1 to 15 of 15
This thread is locked. New replies are disabled.
18 Jun 2009, 3:10 PM
#1
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Ok, so I've never been able to get the Ez-Pages Internal or External links to work. I know it's simple and I've searched this thread but I put in my link under an ezpage as an external link (http://www.whatever.com/mypage.html) but when you go to that ezpage just the title shows and there is no content! I've tried it both as an internal and external link.

Why won't it show up? This hasn't worked for me in several stores and must be something I'm doing wrong because I don't see anyone else complaining about it. Do I not have a certain setting turned on or something? It should be as easy as putting in the external link on the ezpage and then I should see whatever content in the main content section of my site, right?

18 Jun 2009, 5:08 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Have you given them a SORT ORDER greater than " 0 " and have you assigned them to one of the EZpages menus ?

18 Jun 2009, 5:59 PM
#3
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Thanks for the response!

I don't see a "sort order" value on the Ez-Page admin page. I assume you mean sort order on the ez-page menu.

When you ask "assigned them to one of the EZpages menus"... I don't use the ez-page menu sidebar. I just create my own links and hard-code reference them in the Information Sidebox. For example I just put a link to "http://www.mysite.com/index.php?main_page=page&id=8&chapter=0" or whatever ez-page I want to access.

This might be the problem ... I don't see how it would effect it not displaying the contents but maybe I need to go in and assign them to an ez-page menu. Where is that at in the admin panel?

18 Jun 2009, 10:51 PM
#4
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

This has gotta be pretty simple... any body able to give me a hand? Pretty please!

19 Jun 2009, 1:23 PM
#5
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

I have searched and tried everything I can think of and still no luck. Why is this soooo hard? If I put in an external link (like http://www.whatever.com/whateverpage.html) for an ez-page, shouldn't it be displayed when I call up that ez-page? Why isn't this working properly?

19 Jun 2009, 1:27 PM
#6
tony_sar avatar

tony_sar

Totally Zenned

Join Date:
Jul 2006
Location:
Montreal, Canada
Posts:
2,276
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

do you have a link to your site that we can see what is going on ?
you mentioned something about hard coding the links in information side box . why do you do that ?

20 Jun 2009, 6:33 PM
#7
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Yes, check it the site here: http://www.pangeawebhosting.com/getpage2937654.php

In the top left of the header click the "Monsta Gallery" link. This takes you to the ez-page (id #1). That ez-page is set as an external link because I want to easily be able to edit the HTML on that page via the file, but want it to display properly with the header and footer of the site. This ez-page functionality would be great becaus the ez-page is just a wrapper to the HTML page...

...problem is, it doesn't work! As you can see it comes up with no content. Why isn't it pulling the content from the HTML file that is referenced in the external link?

This should be simple and it's not working, soooo frustrating!

By looking at the site that should have answered your question (tony_sar) about why we hard-code the ez-page links... it's so it is worked into the design/layout of the site.

Please help! :-)

20 Jun 2009, 7:18 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

An external link will just redirect to the external page, not display the external page in Zen Cart. Same with internal links, except that this is presumably to a page within the ZC framework and thus will have its ZC page format. Neither will call the referenced file into the current page. Have you tried using the stock ez-page menus to see how they function?
How are you calling the ez-page links? In a PHP file, you can use

<?php echo '<a href="' . zen_ez_pages_link(##) . '">Link Title</a>';?>

where ## is the ez-page id. This will resolve to a link to the external or internal page when the HTML is served to the viewer.

20 Jun 2009, 8:06 PM
#9
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Oh, so it's not a wrapper? Well then I don't even need to mess with it.

How can I create a simple php file that would:

  1. Call the main_page.tpl fle to draw out the "template" of the page.
  2. That template references main page contents in a variable called "body code"... how do I insert my html file in that variable?

Then I would get the wrapper I need.

~ Dave

Dave Mehta
Pangea Webhosting

22 Jun 2009, 2:35 AM
#10
gjh42 avatar

gjh42

Black Belt

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

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

If you want to edit your custom page content in a file outside of Zen Cart, you would best use a "define page". The core content file for one of those can be edited in the Define Page Editor, or as a php file on your home computer. Ez-pages are stored in the database, so cannot be edited outside of the Zen Cart admin.

Get the About Us page mod from Free Addons, and use it as a model to make your own new page. It is not a very simple process, but will be totally effective rather than trying to create a new hack to get the approximate result.

22 Jun 2009, 3:42 PM
#11
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Great idea GJH! I actually looked at that mod and it would have worked but I didn't use it because...

I want to make this easy for my client to be able to add html files to a folder on the server and easily have the cart "template" wrap those pages. This way he can add content easily (with little knowledge of Zen) and the look of the site will just wrap his page's html content.

Having said that I figured out an easy way. I just edited tpl_main_page.php (in the "includes/templates/YOUR_TEMPLATE/common" folder) and added the following code:

if ($_REQUEST['main_page'] == "gallery") {
	// This was added to allow easy addition of pages to his website
	// You just call this by: http://www.yoursite.com/index.php?main_page=gallery
	// The client adds files to the "easyhtmlfolder" in the root of the store
	readfile(DIR_FS_CATALOG."easyhtmlfolder/gallery.html");
	

} else {
	require($body_code); // prepares and displays center column
}

Now you see how that works. It overrides putting in the body code and loads my page if it sees the main_page variable set to what it's expecting. I'll probably make this a little better, by checking if a file exists with that name plus ".html" in the easyhtmlfolder, and if it does then show that page. That means a client can upload any html file they want to that folder and it would get displayed in the wrapper.

TWO QUESTIONS:

  1. What do you guys think of my solution?

  2. Problem: The page title and breadcrumbs show "Page Not Found". This is because it's not finding the page, I'm sure. How can I work around this to define what it should say there?

1 Jul 2009, 12:03 AM
#12
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town &amp; London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

I think you have to be a little careful here, particularly if your client is using an external HTML editor.

An external editor will strip in the page headers as well - (stuff between <head> and </head>) - whereas the default editors in zc admin (either htmlArea, tinyMCE or FCKEditor) will compose html that will sit between the already stipulated <body> and </body> tags.

I grappled with this issue for some time, knowing that clients are not familiar with 99% of anything that makes the site function - html included.

htmlArea is too limited for proper wysiwyg - fck is better and I believe tinymce is even better.

... we just provide extra training to show clients how to construct basic pages using the default editor - much easier... !

1 Jul 2009, 12:41 AM
#13
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

Thanks for the notes fairestcape... actually that's NOT a concern because the client uses an exernal program to edit the HTML (Dreamwaever, FrontPage or Notepad). They are only composing the "body" area of the page... the headers/footers (look of the site) is built around that body (like a wrapper)... thus showing the full page. See, they only have html files that contain the body HTML code.

The reason is because the client is experienced with HTML and it's much easier for them to just write up an HTML file, save it and upload it, versus manually inputting each into the Ez-Page editor.

This solution works EXCELLENT ... one problem that I am hoping someone can help me on. Since I've basically over-ridden everything and called the page contents via checking the passed main_page variable ($_REQUEST['main_page']) it is showing "Page Not Found" in the title bar and on the breadcrumbs. Can one of the guru's tell me how to pass Zen the proper page name so it won't show "Page Not Found"?

1 Jul 2009, 1:19 AM
#14
gjh42 avatar

gjh42

Black Belt

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

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

"manually inputting each into the Ez-Page editor"
What's so complicated or time-consuming about doing a "select all" on a file and pasting into the ez-page editor?

I have a feeling that you need to edit a bunch of files for each page name to get it to work completely reliably. You're trying to bypass the structure of a system without complete understanding of the system.

1 Jul 2009, 2:52 AM
#15
davemehta avatar

davemehta

Zen Follower

Join Date:
Aug 2005
Posts:
130
Plugin Contributions:
0

Re: EzPage Internal or External links do NOT show up for me? What am I doing wrong?

It's not hard, but here's the issue and you'll see why this is better:

  • The client has good HTML skills
  • The client prefers using the WYSIWYG editor for product addition because him and his partner add products to the store
  • If you have this enabled then WYSIWYG editor will be on when adding pages to Ez-Pages
  • If you put in custom tables or forms this could break that

So you see it's (A) easier to just upload an HTML file, (B) He's dealing with about 100 extra pages of content so that would be a lot of repeated cutting-and-pasting that's unnecessary and (C) no issues with the WYSIWYG editor.

While I LOVE the Ez-Pages (they make things so easy) ... I'm sure you'll agree my way is better in this specific instance.

Anyone can help me with the "Page Not Found" in the title bar and breadcrumbs? All I need to know is what varible defines this (and what file) so I can set that when I manually display my page (via main_page.tpl). <<<