Jump to content

Changing the frontpage


aarbee

Recommended Posts

Hello,

I have been fiddling around with phpvms for quite some time, for my new va.

It is a nice tool. And I have created my own template.

In which I succeeded.

I would like to change the frontpage.

In a way where the news is replaced by a static page. And that I have a link to the news module.

Anybody an idea, how to do that?

I have been working my way through the documentations, but I could not find how to do it.

My php knowledge is nearly zero. But I have some knowledge

Here is a link to my site: http://www.citylink-va.com

Greetings,

RobB

Link to comment
Share on other sites

Thank for the tip caalair.

I will look at simpilots.

Regarding your thing about the missing </div> this: On every browser (Firefox 12, IE 9 and Chrome), I have the footer completely to the bottom-right of the page.

However, there are 2 occasions, where it is in the middle of the page. And I only see it, when I am logged in.

do you see it on everypage?

Greetings,

RobB

Added later:

How can I make a startpage or homepage my beginning page?

I am slowly thinking that the layout of this site is my downfall on this moment. But I have more templates on my sleeve...

RobB

Edited by aarbee
Link to comment
Share on other sites

I know. ;-)

But I used to try out things, or fiddle around until...

Meanwhile i fiddled out, that I need echo $page_content;

Else the whole concept is not working at all.

So there must be something in the frontpage_main.tpl.

I found this row:

MainController::Run('News', 'ShowNewsFront', 5);

This prints the news on the frontpange.

And I thought I change it in:

MainController::Run('Pages', 'About');

But now I am getting an empty page.

And I could type a text below the ?> and that is showing.

I use that for the time being.

By the way RogerB, I looked at your VA. Nicely done. What you do is what I have in mind for my VA. But then for Europe.

Link to comment
Share on other sites

I have added the pop-news.

It works. But I am not sure if I am happy with the positions with it.

It simply disappears at the bottom of the page. I know it has todo with the design, which I might change overtime.

I only wonder if it is possible to create a page with the backoffice part and include on that page the news. I had tried this, but it is not visable.

For the rest thanks for the great support.

RobB

Link to comment
Share on other sites

Look at frontpage_main.tpl as a part of your front page. In frontpage_main you can put any html or php and that will only show up on the front page

Basicly, your layout.tpl is a kind of placeholder (in het nederlands zou je het een sjabloon noemen) that directs where certain elements in the page are. Typically, you'd have a kind of banner on the top, then a navigation bar (core_navigation.tpl) and then the "meat" of the page ie whatever index.php is told to show. (echo $page_content) and then a footer. Also there should be all the javascript stuff you need and anything like pagecounters, copyright notice etc.

So on the front page, the echo page_content will show the frontpage_main.tpl

If you create a page in the admin section, you can link to that and it will show instead of the frontpage_main.

A link to the pilot center, will show that instead of frontpage_main.

Suppose that should clear things up a bit.

Succes met je airline!

Link to comment
Share on other sites

I will not write kind of stuff.

I understood what everybody wrote. For which I thank you all.

How ever, on the frontpage_main.tpl I see this row:

MainController::Run('News', 'ShowNewsFront', 5);

Which tells me, show the latest 5 newsarticles.

Instead I would like to see a normal page there, that I can maintain via the admin panel.

On this moment, I have done it via html-coding.

So I would expect something like:

MainController::Run('Pages', 'home');

But that does not show anything.

Maybe somebody can help how to read the page home automatically.

Met Groet,

RobB

Link to comment
Share on other sites

hi

thats why in your layout.tpl you should have this: echo $page_content;

That will put your pages that you create in the admin center. If you go to news & content in the admin center, you see a link called "pages" and there you can create & edit pages. There is also a link to every page, so if you click on it you'll see the actual page as it will look like on the site.

Link to comment
Share on other sites

  • Administrators

There are a number of ways to do this;

1 - If you are just wanting a static page to be shown when someone goes to your site the first time, create a seperate index.html page. Most servers will show the index.html page before the index.php page. Then in your opening html page just link to the index.php page for the phpvms system.

2 - If you want to use data from the phpvms system your best bet is to edit the frontpage_main.tpl file to your liking, removing all the default features and adding your about us text for example.

3 - If you are against having the frontpage conroller being the default controller you can change line 41 in index.php

define('CODON_DEFAULT_MODULE', 'Frontpage');

to the controller and function that you want to be shown by default, for example

define('CODON_DEFAULT_MODULE', 'pages/aboutus');

Link to comment
Share on other sites

I did choose option 2, this afternoon. and it works.

However I was looking for something like option 3.

Do you mean the index,php in the root of the site?

There nothing in it that is called:

define('CODON_DEFAULT_MODULE', 'Frontpage');

I did find it in the app.config.php at line 319.

So maybe you meant a different index.php.

I did a text search on all documents.

Thanks for the help.

RobB

Link to comment
Share on other sites

aarbee, I think I don't fully understand your problem... why create a separate index.html? That would cause a lot of work when you want to change anything like style, layout etc later on

And why set a different frontpage controller?

In the frontpage_main.tpl you can enter any html or php you want, so it wouldn't be any different than just displaying a page from the vms system.

the pro of using the frontpage_main is that you are very flexible: you can add any coding you want and display a lot of information.

If you decide to display a static page like pages/about then you are more flexible on what you can display from day to day, but you also limit your options very much.

One idea ive been toying with lately is to use a cookie to track returning visitors, and present those who have no cookie with a kind of intro-page, maybe featuring a video, that will warm them to the idea of joining your VA.

Any returning visitor (most likely pilots) will go straight to the frontpage. They dont want to see a static page about your va: they will want to see whats new on the va, who was flying, that kind of stuff.

Link to comment
Share on other sites

Mischka

I indeed think you do not understand my issue/problem.

Next to that I am not thinking about adding a static html page.

I have vms installed and I am using it as intended by the creator.

Yet standard you find news on the frontpage, when you open your site. That is intended by the creator.

I also did build a few pages in vms.

And instead of showing using news on the frontpage, I want to show the content of one of the pages I created.

The option I learned to accomplish that where also written by Simpilot.

1. Create a static index.html - But that is not my intend, as I have to re upload my frontpage if I changed something somewhere

2. Edit the frontpage_main.tpl and add the text in there. - This is what I have now, but if I want to change the text I have to re upload it by ftp. This works better then 1, but I still need ftp for this one page.

3. Try to load a page of my choice. But that is something I have trouble with finding.

So for the time being, I keep it at option 2. And is what you suggest as well.

Greetings,

RobB

btw I did send you a PM.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...