Member
Member
vincent3569   2012-01-20, 21:17
#1

hi

is there a function to print a link to a specific page, out of context of this page ?

for example, I want add a link to a page called 'credit' in the footer of my website.

Member
Member
sbillard   2012-01-21, 04:00
#2

Your question is a little ambiguous. Do you mean a custom page (script)? or a particular Zenpage page?

For the former there is printCustomPageURL() for the latter printPageLinkURL()

Member
Member
vincent3569   2012-01-22, 22:11
#3

hi

My request was about the 2nd case, so, I needed to use printPageLinkURL() function.

But I am a little bit disapointed.
printCustomPageURL('Credit', 'credit') gives the following html code :
Credit

in other hand, printPageLinkURL('credit')gives the following result : /page/credit
the 2 functions don't give a similar result...

I wish that printPageLinkURL('credit') gives folowwing code :
title-of credit-page

you could do that ? the printPageLinkURL is unused in the full code of zenphoto 1.4.2.

Member
Member
sbillard   2012-01-23, 01:17
#4

I have no issue with changing this. But I hope other theme developers will step in. Changing the function will make any existing use not work. So even if Zenphoto does not currently use it, some one else might.

Administrator
Administrator
acrylian   2012-01-23, 10:49
#5

Actually I think as well that url functions should include the full url and not a relative one. But I fear issues as this require quite a lot changes as the get variants should do that as well. Howerver the browser actually will add that itself as well.

In short maybe the best way is to echo the get variants and add the WEBPATH constant manually as a workaround.

Member
Member
sbillard   2012-01-23, 20:02
#6

Please try the DEV nightly and give feedback. printPageLinkURLis changed to mimic printCustomPageURL

Member
Member
vincent3569   2012-01-23, 21:09
#7

hi

I saw the track http://www.zenphoto.org/trac/changeset/9042.
It seems to be goof for my needs : thanks a lot !

I will try the NB as soon as possible

Member
Member
sbillard   2012-01-24, 01:05
#8

I hope that is "good" If all is well I will retrofit it to 1.4.2. Let me know.

Member
Member
reneesanguinetti   2012-01-24, 23:09
#9

Hello,
I am using Zenphoto version 1.4.2 [8956] (Official Build)
Current gallery theme: zpFocus_ v1.4.2.
I have created a (Zenpage) page to use as a sitemap. The links are in an html table. Also, I have links to the Contact page, and others throughout my site, I was wondering if inserting the links manually using a href is the proper way to display links or should I use printPageLinkURL()?
Thank-you

Member
Member
sbillard   2012-01-25, 01:05
#10

Well, as this thread does state, the printPageLinkURL() function in the release is not so useful. If you wish to use it, you should install the nightly build.

As to your question. It is better to use provided functions than to hand craft the URLs. For instance these fuctions deal with knowledge of the setting of the mod_rewrite option and generate cruft free links if it is set but query parameter ones if it is not set.

Administrator
Administrator
acrylian   2012-01-25, 10:15
#11

If you mean within the Zenpage page content you cannot use PHP at all. Then you need to use tinyZenpage via TinyMCE to include links. Those of course take care of mod rewrite or not but are of course pasted statically so later changes cannot be applied.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.