ZenphotoCMS Forum
Link to custom page's named anchor? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: General support (https://forum.zenphoto.org/forum-4.html)
+--- Thread: Link to custom page's named anchor? (/thread-10037.html)



Link to custom page's named anchor? - os07 - 2012-05-31

I've got a link to one of my theme's custom pages (called publications.php), which looks like this:

">My linked page

I want the link to go to that page, but to a specific named anchor, say, some text

I think I need to write a custom function to do this, but could use some ideas on how to handle the syntax.

TIA for your help!




Link to custom page's named anchor? - fretzl - 2012-06-01

You can use the [i]menu_manager[/i] plugin to create a custom menu item.




Link to custom page's named anchor? - os07 - 2012-06-01

Well, I really need to place this link in the middle of a block of text, so I don't think that the custom menu item is the right solution?




Link to custom page's named anchor? - acrylian - 2012-06-01

I fear I don't understand the actual problem...




Link to custom page's named anchor? - os07 - 2012-06-01

Perhaps I have not described the issue clearly.

I want to put a link on some text that appears of my custom pages. This link goes to another custom page - I know how to do that. But I want the link to go to a specific named anchor on that linked page.

This is the link as it now appears, just linking to the second custom page:

You can see our publications by clicking here

But I want the link to go to a named anchor on the 'publications' page. The specific anchor is expressed in the ordinary way:

Some text here

So, I need to figure out how to modify the getCustomPageURL function so that it allows me to insert the correct anchor name.




Link to custom page's named anchor? - acrylian - 2012-06-01

Ah, ok. `




Link to custom page's named anchor? - os07 - 2012-06-01

I tried appending the anchor that way, but it doesn't seem to add anything to the link to the page itself.




Link to custom page's named anchor? - acrylian - 2012-06-01

I don't understand. If you add it it is added to the link. Here a link within the theming tutorial as the news page is technically just a special custom page:
http://www.zenphoto.org/news/theming-tutorial#part-2




Link to custom page's named anchor? - os07 - 2012-06-04

Works fine, now - a cache problem, I think.

Thanks again for your help!