Jump to content

  • You cannot start a new topic
  • You cannot reply to this topic

How To Check If A Blog Page Is A Root Page? Rate Topic   - - - - -

 
  • bebopboy
  • Advanced Member
  • Trial users
  • Join Date: 04-Feb 20
  • 84 posts

Posted 18 February 2020 - 08:18 AM #1

Hi, so I want to be able to automatically add the link to the root page of the blog of the company to their microstore. 

 

Any idea how I can identify if a blog page is a root level page from within the controller files?



 
  • eComLabs
  • CS-Cart Expert
  • Authorized Reseller
  • Join Date: 27-Jan 14
  • 20784 posts

Posted 18 February 2020 - 01:31 PM #2

Check by parent_id. The value will be 0 for root level blog posts


GET A FREE QUOTE | CS-Cart Add-ons | CS-Cart Licenses | CS-Cart Development | CS-Cart Design | Server Configuration | UniTheme and YOUPI
CS-Cart                USD 345     Multi-Vendor              USD 1250    Multi-Vendor PLUS           USD 3100 (2775)
CS-Cart Ultimate  USD 775     CS-Cart + YOUPI      USD 545      Multi-Vendor Ultimate       USD 7500 (6000)

 
  • bebopboy
  • Advanced Member
  • Trial users
  • Join Date: 04-Feb 20
  • 84 posts

Posted 21 February 2020 - 03:33 AM #3

Thanks! That helped, quick follow up question, how does the backend system (vendor panel) differentiate when you're editing a page or a blog? Is there a variable I can check for that?



 
  • Hungryweb
  • Senior Member
  • Authorized Reseller
  • Join Date: 10-Feb 12
  • 1265 posts

Posted 21 February 2020 - 05:29 AM #4

Blog

page_type=B

Page

page_type=T