![]() |
|
rewrite token for gallery page url - 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: rewrite token for gallery page url (/thread-13030.html) Pages:
1
2
|
rewrite token for gallery page url - vincent3569 - 17-10-2017 hi several themes uses gallery.php as index page for their gallery (as offical zenpage and garland themes). rewriteToken plugin allows to change some rewrited url. if you think it's a good idea, could you update this plugin to enable a token to change gallery url as needed? rewrite token for gallery page url - acrylian - 17-10-2017 The reason there is no rewrite token is that this is a plain custom page ulr (in theme terms). We will probably not add anything for it at this time as we have other ideas for this page going on. Since there is a mismatch in url structure if this is the base gallery url in relation to album pages anyway. It may be decoupled from the custom page url just like Zenpage pages are in the future. Then there will be surely a way to define its name. rewrite token for gallery page url - sbillard - 17-10-2017
rewrite token for gallery page url - vincent3569 - 17-10-2017 thanks Stephen. my final plugin is as following:
rewrite token for gallery page url - vincent3569 - 17-10-2017 but it doesn't work. I have this in my admin:
and
and
but the rewrited url remains rewrite token for gallery page url - sbillard - 17-10-2017 How are you creating the url? rewrite token for gallery page url - vincent3569 - 17-10-2017 I suppose it is linked with this function
I really don't know if it follows the internal rewrite engine of Zenphoto and if rewrite token may be applied in that case. rewrite token for gallery page url - sbillard - 17-10-2017 Yes, that function does not do the rewrite rules. You should use the function getCustomPageURL() instead. Really, the getGalleryIndexURL() function should only return the index.php page. Themes should know if they are having a "gallery" page for the albums and act accordingly using getCustomPageURL('gallery') for the link. That is how it is with ZenPhoto20. Much less prone to error. rewrite token for gallery page url - vincent3569 - 17-10-2017 something goes wrong somewhere... I add so it seems that plugin doesn't add values to and in the other hand, in this template function
we are allways in the rewrite token for gallery page url - sbillard - 17-10-2017 Are you sure the galleryToken plugin is enabled? Sure sounds like it is not. Also check the rewriteTokens plugin options to be sure that "gallery" is shown and has a value. I think also that the script above has an error. Probably should read rewrite token for gallery page url - sbillard - 17-10-2017 actually, the line should be as I originally quoted it: rewrite token for gallery page url - sbillard - 17-10-2017 Woops. forgot to check the text paste. Should be rewrite token for gallery page url - vincent3569 - 18-10-2017 yes, galleryToken plugin is enabled. I change rewrite token for gallery page url - acrylian - 18-10-2017 Actually it has a second parameter to append extra queries such as the page number. That should be something like Btw, we have some plans with the gallery page that will also involve changes to the "galleryindex" page handling in the future. rewrite token for gallery page url - vincent3569 - 18-10-2017 yes of course. the fact is that I will be patient and I will waiting for the major release... rewrite token for gallery page url - acrylian - 18-10-2017 Internally It also would use a custom index page if the the option We have some term issues since normally "gallery" means the Zenphoto site in total so by default the home page isthe gallery index (= top level albums). Using a gallery page it is not or you even have two "gallery index" pages depending on the theme used. Thanks for the patience though. I would love it to happen faster. rewrite token for gallery page url - sbillard - 19-10-2017 I am a little confused here. Can you explain more on how you are using this? Normally the getGalleryIndexURL() and getCustomPageURL() are used when you are NOT on the target page. If that is the case how do you determine which page of the gallery the link should point to? If you are on the albums pages then the breadcrumbs functions should give you the correct (rewritten) links to other pages within the "gallery." However, that seems not the case. So a bug in those functions? rewrite token for gallery page url - vincent3569 - 19-10-2017 hi have a look on zenpage theme. if you have a gallery with more than one page, and your are on an album of the 2nd page, the gallery link in the breadcrumb gives you this url for me it's OK because in the breadcrumb, I want to know on witch page I am (and go back to the right gallery page) and in sidebar, I don't want pagination (I only want to point to the root of the gallery). BUT, the rewrite token for gallery page url - acrylian - 19-10-2017 This function allows any page to be the index page. It simply does not know which page it is going to use until it gets the name set via the "custom_index_page" option which usees the page name and does not know about any rewriting. This is in this case "gallery". To rewrite this you need to hook into the rewrite token for gallery page url - vincent3569 - 19-10-2017 unfortunatly, I don't understand nothing :-( |