I'm in the staging phase of building my website.
I have another website with the URL I will end up using when the website I'm building right now is ready. I'll be closing down the first website.
What's the best time in the process to set up the internal links on the new website? If I set them up while in the staging URL will all of the internal links automatically switch when I put in the final URL??
Solved! Go to Solution.
Have you ever seen those questions posed by big companies that someone comes along and simply answers and get's the $10,000 prize?
Well here is one such answer and I would be happy to get a single kudos...............
Instead of putting the URL's into pages, create a single PHP variable '$URL' and that variable is equal to the current URL. Include this small bit of code in ALL of your pages. You can even use PHP to do this, as in the 'include( )' function, which is a single line of code.
When the time comes to move, you simply change the value of one variable..... the URL!
BOOM.....!! Done !!
Every single instance of URL!
It's no more work to type the little bit of PHP code instead of the URL because you type it once, then copy and paste it. If you are using a good text editor then it's even easier by making aliases / map so that something like typing 'pp' would auto complete it.
Also don't retype same code on each page. Use separate file for code and use the include function.
This is awesome @Retired. Couple of questions, though. What is the exact syntax for this and where do you put the URL and where do you put the text you want to pull in? In my case, I have a disclaimer that I want to appear at the bottom under each product's body copy that says things like "product is not actual size, props shown are not included, etc.". Occasionally, I've have the need to change this. With thousands of products, it had to be done manually until someone gave me a way to put a script or something in the header that I would call in at that spot. (This was on the original shopping cart.) With GoCentral ecommerce, will this idea you've suggested accomplish the same thing, or is there a better way? Thank you in advance for your help!
Thank you for your nice remarks @Hopeful, but my balloon deflated a little when I saw GoCentral mentioned.......
To my knowledge as of yet GoCentral doesn't allow you to add your own code, as of yet. I thought I heard it was coming one day??
We super hero Developers forget sometimes that most folk can't fly....... and our kryptonite (I can't believe my super spelling checker let the word Kryptonite through..... SUPERMAN IS REAL...PROOF!!!) is CMS. Give us a text editor any day.