Forums / Templates, Stylesheets, Page Layout / Linking define page from footer

Linking define page from footer

Views: 1,542

Results 1 to 14 of 14
17 Jan 2012, 11:28 PM
#1
johnnyh avatar

johnnyh

New Zenner

Join Date:
Oct 2011
Posts:
50
Plugin Contributions:
0

Linking define page from footer

Hoping someone can help...
Just succeeded in linking from my footer to page_2 now renamed to "butik" (store) using an internal link.
This however is not the right way since it will then not translate when choosing english.
So how do I link to page_2 (now called "butik") so that the link will translate?
site is www.artos.dk
really hoping for some insight here

Johnny

18 Jan 2012, 1:43 AM
#2
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

english>extra_definitions>easy_pages_definitions.php

add a new define


Play with it long enough and you will break it.
18 Jan 2012, 2:18 AM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Linking define page from footer

That file currently only defines sidebox or overall menu titles. You could add a new define there, but it wouldn't apply to any individual ez-page link name without recoding the files that use those links.

You might be able to use the Multi-Language EZ-Pages mod in Free Addons; I haven't looked at it myself to know exactly what elements it controls, but I would think ez-page titles for links would have to be among them.

18 Jan 2012, 7:43 PM
#4
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

I just came across this myself while adding language for a client

languages>english.php needs to be copied and placed in a folder with the name of your template. Then find and edit the text from that file.

If that is not where yours is located. then open your footer menu locate the text for that link and search in the developers tool kit


Play with it long enough and you will break it.
18 Jan 2012, 8:17 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Linking define page from footer

That still wouldn't handle the individual ez-page name links, as ez-page names are only stored in the database.

If you are not otherwise using ez-pages, installing it just for the footer link would be overkill. In that case, hard-coding a link in tpl_footer.php, using the constant that defines the title of the define page, would be best. Then you have a page define file for each language.

18 Jan 2012, 8:51 PM
#6
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

He is talking about the language translation. He has his language set but when he changes to english the translation language is not translated.

He needs to put that define of butik into the english language folder in the name of his template.

That link name should be defined in english.php and if not it will be in the folder that contains butik

Searching for butik in admin Developers Tool Kit will guide him to the file.


Play with it long enough and you will break it.
18 Jan 2012, 8:56 PM
#7
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

The database does not translate languages for links and if it does please lit me know how it would do that.


Play with it long enough and you will break it.
18 Jan 2012, 8:59 PM
#8
gjh42 avatar

gjh42

Black Belt

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

Re: Linking define page from footer

And per the OP, he has used an ez-page internal link, which will show the name of the ez-page as the link anchor text. This will not be in a file, but in the database, and not in English unless multi-language ez-pages is installed.

The text for a hard-coded link in the footer will be handled as you describe.

18 Jan 2012, 9:18 PM
#9
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

Who said he has used an ez-page internal link.

He has not said what he is using.


Play with it long enough and you will break it.
18 Jan 2012, 10:44 PM
#11
johnnyh avatar

johnnyh

New Zenner

Join Date:
Oct 2011
Posts:
50
Plugin Contributions:
0

Re: Linking define page from footer

Sorry for the delay in getting back to this.
Let me clarify...
I'm not using EZ-pages, but the define pages and succesfully renamed page_2 to "butik" by changing these files:

includes/filenames.php
includes/languages/english/page_2.php
includes/languages/english/html_includes/page_2.php
includes/modules/pages/page_2 includes/templates/default_templat/templates/tpl_page_2_default.php

This did the job.

Now my problem is the link itself.
In my footer now I just have:
<a href="index.php?main_page=butik"> Butik i Aarhus</a>
but I guess I need some kind of a php coding in stead?

Hope that clarified?

18 Jan 2012, 11:20 PM
#12
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

I would have used the About Us addon and changed the name to what you wanted it to be and when I got to the language section added one for both languages to get the switch to work.

That is how I thought you had created a new page.


Play with it long enough and you will break it.
19 Jan 2012, 8:05 AM
#13
johnnyh avatar

johnnyh

New Zenner

Join Date:
Oct 2011
Posts:
50
Plugin Contributions:
0

Re: Linking define page from footer

Yes that might have done the trick.
The link works on both languages it is just the link text that needs to get translated when choosing english...

19 Jan 2012, 12:24 PM
#14
usernamenone avatar

usernamenone

Totally Zenned

Join Date:
Sep 2006
Posts:
541
Plugin Contributions:
0

Re: Linking define page from footer

That would depend on where you defined your page.

If you took this and changed it to your link

define('BOX_INFORMATION_BUTIK', 'butik');

the link would look something like this

<a href="' . zen_href_link(FILENAME_BUTIK) . '">' . BOX_INFORMATION_BUTIK . '</a>

If you did not change your page like that then it probably will not be linked like that.


Play with it long enough and you will break it.