How to change index.php home page in Gallery3
navdeep
Joined: 2012-10-04
Posts: 6 |
Posted: Thu, 2012-10-04 14:19 |
Hi all, Gallery3 starts with index.php, which shows galleries. I want to modify that page so I can have a different "front page" using index.php. So: I need http://www.example.com/index.php to go to http://www.example.com/pages/show/home The above URL is from a module called pages. A .htaccess redirect doesn't work, it gets too many redirects when trying to load that page, and search engines can't parse the redirect also. Is there a way to a) change the index.php to show different stuff or b) a way to edit the php code so it loads the module page (pages/show/home) after loading the index.php page? Thank you. |
|
Posts: 27300
The .htaccess file that ships with G3 has directions and examples to remove index.php
Some themes like the grey dragon theme have a 'splash'/'front page' page.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 6
Hey Dave,
Thanks for the info. I have tried the .htaccess removing index.php from the url, which works. But I get too many redirects if I have the pages module load first, since the redirect isn't passing the vars via QSI.
I need the rule for something like this:
#RewriteRule ^index.php$ /index.php?page=home[QSA,L]
#RewriteRule ^$ "http\:\/\/example\.com\/index\.php\/pages\/show\/Home" [R,L]
Posts: 6
Also the same thing is mentioned here, but I don't understand how to follow #1
http://gallery.menalto.com/node/103882
Hi All,
I created some dynamic albums and I would like one of those to be displayed when you land on the homepage instead of the All album. Ho can I do it?
Thanks in advance,
Ste
I guess there is several ways to go about this a couple that come to mind:
1. Make the dynamic album the 'landing' page from your other pages.
2. Use some rewrite magic/voodoo to redirect users to the page you want.
3. A custom theme.
Dave
Posts: 6
Okay so made a default.html file which is loaded before index.php and doing a simple html redirect in side that.
Seems to work. Off to read https://docs.google.com/document/pub?id=1DQ1Tz177aX5ZsSgEbjYtYOBufJ0SYhgYvfJtA6snn2Y Dev handbook to see how to do it in PHP.
Any tips are appreciated.
Posts: 8339
/gallery3/themes/your theme/views/page.html.php
that's how I'm doing it here.
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 6
Suprsidr - Perfect! Thanks
Posts: 8339
Create one or more sub-albums in your root album(place all others in these sub-albums), and in your intro, link to these sub-albums.
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 6
Okay, this works, but is there a way to display the root gallery album somewhere else? I can work around not having it by using the Organize Album to view whats in it, but this would be nice to still be able to see the root gallery folder.
I want my cake and to eat it too. :/
Posts: 8339
Make a new root gallery
Create one root -> sub-album to hold all other albums
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 8339
in my example, the "enter" button takes you to FYW Demo album which is the only sub-album off root
of course I could have multiple enter buttons and multiple sub-albums to add categories/events/dates....
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 6
SUPRSIDR, where in the "/gallery3/themes/your theme/views/page.html.php" do you add that line? I am trying to do this but I am not sure where to put the code.
Posts: 6
SUPRSIDR, where in the "/gallery3/themes/your theme/views/page.html.php" do you add that line? I am trying to do this but I am not sure where to put the code.
Posts: 8339
http://galleryproject.org/node/105804
-s
________________________________
All New jQuery Minislideshow for G2/G3