I have a website that needs to have a variation of pages.
For example:
website.com/variation1/page1
website.com/variation2/page1
website.com/variation3/page1
All of which has the same DB and has the same function. The only difference is that these variations differs in page template ie. Header, Footer, Content, etc. This is for the purpose of analyzing page visits.
With that, what is the best way to do this? In Yii, there is a common layout used so header/footer depends on the layout. In this case, the header/footer should be specific to each page so the user can just modify the header/footer/content of a specific page without affecting other pages.
So, again what is the best approach for this?
Thank you in advance.
EDIT:
I think I know what I’m looking for here:
Is there a way to override/add from a layout the header in a view file?
I just found out a possible solution to approach page variations.
Under my view directory I created a directory
varationwhich contains the pages i.e.So when I want to render the varations I’ll call each in the controller with parameters included.
Ex.
$this->render('variation/1/page1')somewhat.And in each page if you want to use a specific header info you may use
Register Meta Tag
Register Script File / Script
Register CSS File / CSS
Let me know if there are better ways of doing this.