Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Special Page as Index Page
#1
hi. is there a way to define a custom special page as index page.
thanx. christian
Reply
#2
Ever wondered what for is "page template" dropdown in page's option ?
Just create an additional template file, and set it for index page.
That's all you need.
Addons: blue business theme, Online Visitors, Notepad
Reply
#3
hi yojoe, I'd like to use a new page generated with the I18N Special Pages plugin for the index page
than the presetted standard page, because of customized editable elements like a slider-gallery and teaser texts.

here is an example:
http://www.luetten-kulli.de/neu/index.php?id=index-1

is there a way to delete the standard index page an name the slug for a new page as »index« ?

if its not, i will define with the simplepagecontent plugin new html elements an will integrate them in a normal template, but this is more complicated to edit in the cms.

christian
Reply
#4
1o11 Wrote:is there a way to delete the standard index page an name the slug for a new page as »index« ?

if its not, i will define with the simplepagecontent plugin new html elements an will integrate them in a normal template, but this is more complicated to edit in the cms.
I'm not fully sure I understood the logic of your approach. But I see you might took the wrong path cause you didn't get the purpose of additional template files in whole theme pack.

You shouldn't get outside of template files. Otherwise you won't get GS basic functions w/o creating own hooks, which needs much time to be coded. They alsoe do not guarantee you won't have to drop them and create new ones, as your project goes further.
Built-in index page is the one we start with at the beginning. This page cannot be deleted nor replaced, because it wouldn't make any sense.
Modify a bit your approach and:
1. create additional template file for landing page(f.e. indextemplate.php). Consider it as a standalone page, having all content you want to show w/o using any CMS. Set this file as index' page template in page's options. From now on this file takes up the role of index page. It doesn't even need to be connected with GS in any way - for example by calling any GS tags inside it. This might be a plain html file (with .php extension of course)
2. After you finish creating template file, prepare manage-able content to be embedded in above template file. This goes to content containers (base it on GS pages, and just load their content inside this template), slideshow, and dynamic articles list based on special pages <- point 3.
3. create a dedicated template file (if it won't be using default template.php) and set it for new page named news or articles - this will be the page on which you will show the list of articles generated by special pages plugin, not the index page.
4. call i18n search plugin in indextemplate.php, that will grab latest N articles from special pages (you didn't forget that SP plugin cooperates with i18n search?) and show them everywhere you want. Refer to both plugin settings. It isn't complicated, but you might need to create a custom component to render the list in the way you want.

This way all your website's content is manage-able from backend, and you do not need to:
- create custom rewrite rules to point to a standalone template file
- change GS core files
- create a complicated hooks


GS is really that simple as it states Wink
Addons: blue business theme, Online Visitors, Notepad
Reply
#5
There are actually many ways to do this.
And I believe someone has replaced index by adding the index flag to the xml file after removing the default.

I personally do this via the
content or content-bottom hook and inject my own content from whereever.

I use my hook component plugin and either include php files from outside my cms or call another pages content.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#6
hi yojoe. thank you for answering. is used a different template as you propose and it worked fine. regards christian
Reply




Users browsing this thread: 1 Guest(s)