Forums / General Questions / Correct means, and best practice, for linking from an EZ Page to a Define Pages?

Correct means, and best practice, for linking from an EZ Page to a Define Pages?

Locked

Started by hotmetalrabbit on 4 Jun 2009, 11:16 PM · Views: 1,074

Results 1 to 4 of 4
This thread is locked. New replies are disabled.
4 Jun 2009, 11:16 PM
#1
hotmetalrabbit avatar

hotmetalrabbit

New Zenner

Join Date:
Jun 2009
Location:
San Francisco Bay Area, USA
Posts:
9
Plugin Contributions:
0

Correct means, and best practice, for linking from an EZ Page to a Define Pages?

I'm new to zen-cart: this is my first store, and my first posting. I would appreciate help/advice.

What is the correct means, and best practice, of linking from an EZ Page to a Define Pages? I am linking from an EZ Page to /modules/pages/page_3.

In the EZ Pages Editor, entering the following link in the URL creates the correctly linked hyperlink.
/zen-cart/index.php?main_page=page_3

From the perspective of zen-cart functionality, ‘best practice’ and security, is this the best means? :unsure:

I found the function zen_ez_pages_link() for linking to an EZ Page. Is there a function for linking to Define Pages, or other functions for linking?

Zen Cart 1.3.8a
Database Patch Level: 1.3.8
v1.3.8 [2009-05-07 16:49:37] (Fresh Installation)
Server OS: FreeBSD 6.3-RELEASE
Database: MySQL 5.0.75
HTTP Server: Apache/2.2.11 (Unix)
PHP/5.2.9 with Suhosin-Patch mod_ssl/2.2.11 OpenSSL/0.9.7m mod_apreq2-20051231/2.6.0 mod_perl/2.0.3 Perl/v5.8.7
PHP Version: 5.2.9 (Zend: 2.2.0)
Add-ons: None

4 Jun 2009, 11:43 PM
#2
skipwater avatar

skipwater

Totally Zenned

Join Date:
Jun 2008
Location:
Washington, DC
Posts:
775
Plugin Contributions:
1

Re: Correct means, and best practice, for linking from an EZ Page to a Define Pages?

In the EZ Pages Editor, entering the following link in the URL creates the correctly linked hyperlink.
/zen-cart/index.php?main_page=page_3
This should help

echo '<a href="' . zen_href_link('page_3') . '">Click for Page 3</a>';

Skip

• 446F63746F722057686F •

5 Jun 2009, 11:03 AM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Correct means, and best practice, for linking from an EZ Page to a Define Pages?

You almost got it right the first time.

When you use EZPages to create an internal link, it's simply a case of pasting:

index.php?main_page=page_3

Into the Internal URL field of the EZPage edit screen.

No need to put the sub-folder /zencart/ as this is in your <base href> header...

20 years a Zencart User

5 Jun 2009, 8:24 PM
#4
hotmetalrabbit avatar

hotmetalrabbit

New Zenner

Join Date:
Jun 2009
Location:
San Francisco Bay Area, USA
Posts:
9
Plugin Contributions:
0

Re: Correct means, and best practice, for linking from an EZ Page to a Define Pages?

  • Schoolboy: index.php?main_page=page_3 works perfectly.
  • Skipwater: When I added "echo '<a href="' . zen_href_link('page_3') . '">Click for Page 3</a>';" into the html, the Ez Pages HTMLarea editor made substitutions that defeated the syntax. However, I will note this syntax for possible use elsewhere.

Thank you both, Skipwater and Schoolboy, for your help!:smile: