View Full Version : two CMPS pages in one site?
marcossalazar
09-26-2007, 11:11 AM
Hello,
I'd currently have a CMPS page as a link to a new page (as opposed to my index page) and was wondering how to create a new one with different content from the site. Would I just upload a new CMPS index page, rename it to something different than my original one, and that is it?
I am thinking it is more complicated than that. How would it look within the AdminCP?
Thanks for the help!
Marcos
Brian
09-26-2007, 01:31 PM
Just make a copy of your cmps_index.php file, rename it to whatever you would like, and then add this code in the file just after the opening <?php tag.
define('VBA_PAGE', 'page_identifier_here');
Replace page_identifier_here with whatever you use for the Page Identifier setting for the page you would like to use and that will force that file to always use that CMPS page.
towermatt
09-26-2007, 02:08 PM
Its a wonderful, beautiful thing.
marcossalazar
09-26-2007, 03:00 PM
Yep, towermatt has what I am looking for.
Thanks for the reply Brian. But I am not sure what you mean by the "Replace page_identifier_here with whatever you use for the Page Identifier setting for the page you would like to use and that will force that file to always use that CMPS page." Does the other CMPS page have a page identifier? Also, does anything need to be changed in the ACP? Will a new page be in the "Edit Pages" section of the ACP?
Thanks,
Marcos
towermatt
09-26-2007, 03:08 PM
I'll do a quick little walk through for you.
the secret here is the cmps_index.php file that comes with the CMPS
First, create some pages in your adminCP>CMPS (doesn't matter what type they are). Keep track of the identifier that you put in each
Now, those pages have a URL that is specific to the identifier (?page=your identifier)
If you create a folder on your server called "news" for instance. Make a copy of the cmps_index.php file and place it in that folder. Then edit that copy of the file and insert what Brian said above into it where the page identifier is equal to the page you want to show there.
Rename it "index.php" if it has not been already.
Now, when you go out to that address http://www.yoursite.com/news
it will pull the specific page that goes with that identifier.
Tom M
09-26-2007, 04:09 PM
The other way is to leave it in the same folder as the CMPS index.php file and rename it to news.php. I do that with several pages (like about.php, privacy.php, etc.) on one of my sites.
towermatt
09-26-2007, 04:33 PM
Oh yeah, that works great too. I had just wanted my news to come up with the raw addy...http://www.thedarktower.com/news
as the index in that folder, its just the default.
Both methods work really well though
marcossalazar
09-26-2007, 04:36 PM
The other way is to leave it in the same folder as the CMPS index.php file and rename it to news.php. I do that with several pages (like about.php, privacy.php, etc.) on one of my sites.
Hey Tom,
I apprecaite the walk through! And great site by the way...it is one of hte best one's I have seen with lots of sections but easy to navigate.
I used what you described above...just made a new module page, inserted what Brian suggested into the new CMPS index.php file (which i named news) with the page identifier and it worked perfect! Thank you so much!
Marcos
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.