0

I am trying to pull cms blocks that belong to a certain page. i saw that blocks are stored in cms_block and pages stored in cms_page. I tried to create a query that might help me pull this data.

SELECT cms_block.title FROM cms_page INNER JOIN cms_block ON cms_page.page_id = cms_block.block_id;

and

SELECT cms_page.title FROM cms_page INNER JOIN cms_block ON cms_page.page_id = cms_block.block_id;

with both of these queries I do get some results. But I suspect that the results are not accurate because when i try to load cms page and cms block using either page_id or block_id with same id. the pages that comes up are totally not related.

Example:

http://domain/index.php/admin/cms_page/edit/page_id/7/ loads unrelated data compared with that following block;

http://domain/index.php/admin/cms_block/edit/block_id/7/
1

You can't, CMS Pages are not related to blocks in any way.

You can show CMS Blocks in pages by calling them in XML or in code

  • cool, I'll try to create a custom table thanks – Mthe beseti Aug 15 '18 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.