How To Change / Reset CMS Page IDs?


Subject: How To Change / Reset CMS Page IDs?
Hi all,

I'd like to know how to change CMS Page IDs, and (most importantly) how to reset the counter for it.

I made a couple of CMS Pages, tried things out, and deleted them, but then, when I add another page, the CMS Page ID continues with whichever highest number it used to be, and keeps counting from there, finally resulting in something like this:

cmspageidproblem

As you can see, the CMS Page IDs read: 1, 2, 4, 6, 21, and 22. I'd like to have the Page IDs run chronologically, 1, 2, 3, ... etc. Now, whether or not I delete the last two pages, every time I add a new page, it will give it page ID 23 and higher. Editing the database record 'cms_layout' doesn't really do the trick - sure, I can change the existing page IDs, but 1. adding a new page will still result in a high ID number, meaning I would have to change it every time, and 2. clicking on 'Duplicate Blocks' when editing that particular CMS page will result in an error.

What can I do?

Subject: Re: How To Change/reset CMS Page IDs?
Hi !

If my memory is good, the field is in auto increment. There's no solution to reset an AUTO_INCREMENT field, only this trick : delete it and re-add (as a Primary Key AUTO_INCREMENT). Do a save of the table before and don't forget to clear the cache, that should work.

Profile PM  
Subject: Re: How To Change/reset CMS Page IDs?
Thanks, it was very helpful!

Subject: Re: How To Change/reset CMS Page IDs?
You may alternatively try to assign a name to your pages, so they will be independent from the ID.

For example, you have a page called "Commodore 64 Emulator": if you assign c64_emulator.php as a filename you will then be able to reach that page by typing c64_emulator.php in your browser, without needing to remember the ID of the page.

Just a suggestion...


Page 1 of 1


  
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events

   

This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.

Powered by Icy Phoenix based on phpBB
Generation Time: 1.0352s (PHP: 3% SQL: 97%)
SQL queries: 15 - Debug Off - GZIP Enabled