We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Where are Pages module data stored?

Development and Programming

carvingCode's avatar
carvingCode
380 posts
15 years ago
carvingCode's avatar carvingCode

Can anyone give me a heads up as to where in the database the Pages modules ‘Pages URI’ and ‘Template’ data are stored?

TIA

       
Rob Sanchez's avatar
Rob Sanchez
335 posts
15 years ago
Rob Sanchez's avatar Rob Sanchez

They are store in exp_sites in the site_pages column, in a base64 encoded serialized array:

$this->EE->db->select('site_pages')
             ->where('site_id', $this->EE->config->item('site_id');

$query = $this->EE->db->get('sites');

$site_pages = unserialize(base64_decode($query->row('site_pages')));

print_r($site_pages);
Array
(
    [uris] => Array
        (
            [207] => /my/pages/uri/
        )

    [templates] => Array
        (
            [207] => 2
        )

)
       
Focus Lab Dev Team's avatar
Focus Lab Dev Team
1,129 posts
15 years ago
Focus Lab Dev Team's avatar Focus Lab Dev Team

[edit] looks like Rob beat me to this 😊

       
carvingCode's avatar
carvingCode
380 posts
15 years ago
carvingCode's avatar carvingCode

Thanks, Rob and Erik.

What I’m attempting to do is this: Given that I have the ‘page_uri’ (only), I need to grab the contents of a particular field displayed on this page and then output it in a template.

Either of you know how I might get the ‘entry_id’ of a page whose ‘page_uri’ I have? With that, I could find the field’s contents.

TIA

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.