Should Bootstrap handle scripts and styles instead of views? [closed] - php

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I am working on a distributed project where I saw various "appendStylesheet" and "appendScripts" on headLink which were added in Bootstrap.php.
Honestly, I am not much experienced with ZF (consider few months ~ 2 projects) and personally I think, it is not "semantic". You can always append scripts via layouts or if you want flexibility as per different views, they could be called to appendStyles as every view would want (if not coded in layouts).
My question is about working "collaboratively".
Should "views" related scripts be added on bootstrap or let it do the function of routing and implementing modules, etc?

styles and scripts should be added from the layout or viewscripts. this way you can easily switch the application's "design" from one to another by simply replacing the view and public folders.

Related

Laravel Website multiple homepage. User can change [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
I want to know the way to use my multiple homepage design in Laravel. And User can switch homepage design from site settings like wordpress. Can anyone help me to find the way to make laravel website with multiple home page system?
The question is quite general so I'll share my personal approach:
I create several template folders in my view directory with the same blade file structure inside.
Then from the Controller, I just change the call to the view according to the requested template:
return view($template_name . '.index');

twig best practice regarding template locations [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
My site isn't using a front controller pattern or anything fancy, it's currently a bunch of php files in folders.
e.g:
http://www.example.com/customer/account-settings.php
maps direcctly to:
/var/www/sites/example/http/customer/account-settings.php
I've started playing with twig, and wonder what the best practice for locating the template files is?
Should I put them all in
/var/www/sites/exammple/templates/
or should I put them alongside their corresponding .php file?
/var/www/sites/example/http/customer/account-settings.twig
/var/www/sites/example/http/index.twig
etc?
I would place all files in one directory and than create a configuration variable like
$templatesDir='/var/www/sites/exammple/templates/';
to reference the location.
That way views are organized and not scattered around the project. If for some reason you want to change their location to another directory you just have to change the $templatesDir variable in one place.

Understanding PHP templates [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am confused of the concept of templates in PHP. What does it really mean?What is the concept of templates in php?
template
A template is basically a visual representation of something (like data I.E), can be dynamic or not, the template should hold placeholders that will be replaced with values passed to the template. Usually a template is a skeleton that should serve only as the visual representation (styles, markup). The main purpose of templates is to separate the logic from the visualization.
In MVC, the templates would be the View Layer.

Yii2 advanced structure(need another application like frontend/backend) [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
I've started recently working with yii2.Using the basic app is easy but what I need to do now is to create an advanced template which has more that frontend and backend.I need it to also have midend and one more compoenent(same as frontend/backend folders).I have been trying to search on the internet but I did not find anything usefull.
I would be grateful if any of you guys can help me out here.
Best regards,
Marius
Copy the backend folder to a new folder, search for "backend" in the project and replace / add a link to the new folder you have created.
There are not so many places, there is one in common/config/bootstrap.php and the rest I believe are in the new "backend" folder. Remember to change the namespaces of controllers / models etc.
I have made this recently, it is easier then you think.

Joomla Framework Questions [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm planning to make me a new website. I have choosen Joomla as my CMS to go.
But before I start, I have 2 questions:
Is it possible (and easy) to change the Theme on the fly? So that a user can select an alternate theme?
What do u think about frameworks? Especially for Joomla. Should i use one? If yes, which one do you suggest? (a free one)
Yes it is possible for the user to switch the template on the fly. See this extension.
Joomla! has its own built in MVC framework which you'll see and use if you develop your own components. There is no need to use another framework within that.

Categories