Could you point me in the right direction for doing this then(keep in mind, I am NOT a coder)? I think this would be a much better solution, and a much better learning opportunity for me as well.
Printable View
I decided to forget trying to add php to my ez-page. No one seems to have a viable solution to offer, so, I decided to go with the About Us Page mod and just create a new defines page (unless that's what everyone has been hinting at all along).
I then added a php call inside of my new defines page to the script I wanted to use, and it works just fine. Problem solved. :cool:
Regarding the fix to eliminate your html from wrapping around the TOC.
Copy includes/templates/template_default/templates/tpl_page_default.php to includes/templates/CUSTOM/templates/
Then add this after line 52 (immediately below the last </div>):
<br class="clearBoth" />
The class comes from the main stylesheet.
You can also do: <br clear="both" />
If you implement this fix you won't need to add extra spaces and will achieve a consistent cross-browser look.
I am trying to implement the "correct" way of linking within EZ pages.
So I did:
<a href="<php echo zen_ez_pages_link(15,2); ?>">Read more...</a>
and got a 403 Access Forbidden error on my test site.
Now, when I do my "incorrect" way:
<a href="index.php?main_page=page&id=15&chapter=2">Read more...</a>
it works.
Please explain.
Thanks.
The "correct" way of linking to PHP pages is for linking TO them from PHP code. It does more than just create a link. It handles whether the link is to an external or internal page, whether it should be opened in a new window or tab, and whether the page being linked to should be encrypted. This is why it is best practise to use it when possible.
However, EZ-Pages are designed to allow users to insert HTML onto a page not PHP, which is why you need the explicit HTML instead of a PHP function when creating a link ON an EZ-Page.
I don't know if this explains the specific error that you got, but hope that it clarifies why each is the "correct" approach is different contexts.
I answered my own question.
However, my answer is still not satisfactory.
I did this from a define page:
<a href="<php echo zen_ez_pages_link(15,2); ?>">Read more...</a>
and am still getting the 403 Access Forbidden error.
I am using the last version of XAMPP to test.
Is there a syntax error there?
Anybody care to explain?
Thanks.
have created ezpage and enabled it to be shown in header footer and side box but cannot see the page/link? any ideas?