Jump to content

bluesomething

New Members
  • Posts

    2
  • Joined

  • Last visited

bluesomething's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Perhaps my description was not clear. The MVC-model, I understand. But in case of dynamically fill the social media tags this model doesn't fit one on one. So therefore my question about this section:
  2. I'm new in OOP php and started learning by checking out courses and tutorials with the mvc-model. Most is understandable. Then I started to check out how to use OOP on my website. The first thing I've wanted to change was to dynamically fill the social media tags by data that is used on multiple places of the website. I'm wondering if I'm on the right track. So here are my thoughts: There are three flavours, I think. 1. the homepage, example: www.mywebsite.com 2. a chapter, example: www.mywebsite.com/news 3. a content item, example: www.mywebsite.com/news/winteriscoming create a class called PageInfoModel: here I will select the url, image en titel of the page from the database, in case of the first 2 flavours create a class called PageInfoView: contains properties url, title, image and a get and set method for the properties A controller is not necessary. In case of flavour 3 the properties need to be filled by a contentitem class, I think. So no duplicate code is made. Is this the right way to go and if so, how do I do flavour 3?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.