Skip to content
This repository has been archived by the owner on Dec 6, 2019. It is now read-only.

How are the modules/ redirects made in php? #135

Open
apoorvpal01 opened this issue Feb 10, 2017 · 3 comments
Open

How are the modules/ redirects made in php? #135

apoorvpal01 opened this issue Feb 10, 2017 · 3 comments

Comments

@apoorvpal01
Copy link

Hello,

Not exactly an issue but any idea how one can set the navigational links to change the url to something/about or something/view without reloading and changing only one section of the page. I am familiar with php, js, css, html and jquery, jquery has an option to reload a div but that won't change the url of the browser just the div. Also I need the og:title, description and other meta tags to change based on what is loaded into the main body while the header and footer and navbar are static on the webpage.

Thanks!

@nabeelio
Copy link
Member

nabeelio commented Feb 10, 2017

You would need to use this: https://developer.mozilla.org/en-US/docs/Web/API/History_API

This is something that's handled by angular, react, or some type of front-end framework like that. You'd need to do quite a bit of rework on the templates and stuff, but reloading, etc is available through the action.php file.

@apoorvpal01
Copy link
Author

Thanks for your quick reply.

What I meant was suppose I have an about page, when I click on about in the navbar the URL will change to home/about and not .html or .php file and also only one div or one section changes to the content of the about page. If possible please inform me or share some relevant links. I am familiar with the languages mentioned above. If AngularJS is required for this, it would be great if you could send me a link to the documentation for this feature of AngularJS.

@nabeelio
Copy link
Member

To get rid of the suffixes, you'll need to configure Apache or nginx for URL rewrites in whatever virtual host file there is. I sent you a link above to the history API, you can use that as a reference to Google up how Angular or whatever framework you want to use would handle that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants