[SOLVED] New menu pages

Flippy146

Joined: 2011-05-16
Posts: 17
Posted: Tue, 2011-05-17 10:34

I have an About page using the 'about' module. Though I also need a contact and links page. I'm aware of the contact module and services module, though I'm no very experienced php'er. The contact module displays in the box not in the menu and the services, well I can't get the URL right (so instead of /services).
Or I can bend these, resolving the problems just mentioned.

I know HTML and CSS, so what I am looking for is actually the method to transform an 'about page' module to whatever I like, mainly the way to change the url path and a good way to have all my posiblities to use html and css.

Can someone help me out on this one?
Thanks in advance!

,Stephan.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25940
Posted: Tue, 2011-05-17 13:06

So the services module works just that the URL is not what you want?

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Flippy146

Joined: 2011-05-16
Posts: 17
Posted: Tue, 2011-05-17 17:03

Well actually yes, for the link page definitely.
And for the contact page, or I can insert my own php lines creating a contact form, or I can use the contactowner but then I need the information for getting to show in the menu bar and remove it from the sidebox. Don't know what's best.

 
Flippy146

Joined: 2011-05-16
Posts: 17
Posted: Thu, 2011-05-19 10:54

Is there a possibility you or someone else can explain what I need to edit to be able to get the linking right, so I can name it whatever I want and create a simple html page with any name.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25940
Posted: Thu, 2011-05-19 14:51

Just look at the differences between the services and about module. The services module was just renamed (text changed in a few places in the code) to the serices module.

I'm still lost as to what you want to accomplish.

Quote:
Is there a possibility you or someone else can explain what I need to edit to be able to get the linking right,

linking of what? The URL of the about or services module? Do you just want the url to be like:
example.com/galelry3/someURL/ to go to a page titled 'someURL'?

Please develop a user-story with screen-shot mock-ups so I can help you out.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Flippy146

Joined: 2011-05-16
Posts: 17
Posted: Fri, 2011-05-20 08:18

Oke, well let's start off simple, I'm creating this gallery in a different language. I added the module:: About. So the menu button has to change in the language, so instead of 'About' in the menu I want 'Over' (which is Dutch).
So I changed in the module > helpers > about_event.php the label of the function site_menu.

Quote:
static function site_menu($menu, $theme) {
if (module::get_var("about", "hidden") != true) {
$menu->add_after("home", Menu::factory("link")
->id("about")
->label(t("Over"))
->url(url::site("about/")));
}
}

Than I can change

Quote:
->url(url::site("about/")));

Into

Quote:
->url(url::site("over/")));

now the menu option 'Over' has the right url, though this url does not link to the about page yet. (Page not found). How do I accomplish that?

I hope it's a bit more clear now! =]

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25940
Posted: Fri, 2011-05-20 22:05

Why not use the translation? The text 'about' is translateable. But the URL is not. You could create a over module I guess and use some language detection to only show that URL.
I don't know how to change the URL of a module when a different language is selected/detected.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
Flippy146

Joined: 2011-05-16
Posts: 17
Posted: Wed, 2011-05-25 13:41

Dave I'm sorry but I still haven't figured this out. I'm working in the 'services' module now.
Forget about the translation etc.
I tried replacing every 'services' into 'links' though that didn't work.
I just want to let it create the right page so website.com/links instead of /services. If it says services at the admin menu or wherever a guest can't see it, I don't care. I just can't get it figured out. I'm no born phper so it all is a bit of a hard puzzle to me.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 25940
Posted: Wed, 2011-05-25 21:08

Try this module.
I replaced all instances of services to links in the services module.
Remember file names need to be changed as well.

Dave

_____________________________________________
Blog & G2 || floridave - Gallery Team

AttachmentSize
links.zip6.1 KB
 
Flippy146

Joined: 2011-05-16
Posts: 17
Posted: Thu, 2011-05-26 08:55
Quote:
Try this module.
I replaced all instances of services to links in the services module.
Remember file names need to be changed as well.

Dave

You're a hero. Thanks a lot!