Code Monkey home page Code Monkey logo

Comments (6)

schmunk42 avatar schmunk42 commented on August 18, 2024

What do you mean exactly with "Read-only directories"?

We usually create the frontend site structure with p3pages, which included the model class P3Page, which has a method getMenuItems to retrieve items in a way so that CMenu and extended classes can instantly use it (Sorry about the incomplete docs). And you can define multiple root nodes, eg. for top navigation, footer links, etc...

In the default setting the backend theme and the frontend theme use the same _menu.php. But it's up to you if you want to change that. The reason for two themes by the way is that heavy modifications in the frontend may very likely break your backend modules layout.

I've found no flexible and powerful way yet to include the backend modules in to the menu, so that they still can be configured via a web interface, so I simply decided to adjust the PHP file, if it's needed - as it's part of your application, it will always fit with your configuration and installed modules.

There is a Wiki page about Pages, but you're right, it should contain more guidance...

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

And ... which pre existing tables do you have? Do they contain menu items?

from app.

dzogchen avatar dzogchen commented on August 18, 2024

Hi Tobias, thanks for responding.

I think maybe the directory permissions were a hangover from having to change things in MAMP so that Composer could work its magic during the setup

The tables are content for a restaurant site I built in Yii 1.0. They contain things like food items, wine, etc. The existing site isn't responsive and rather than re-do a 1.0 site I wanted to upgrade to 1.1.13 and a responsive theme. I wanted to be able to add menu links for the (restaurant) menus (dinner and lunch) and for the wine list, and for the owners' blog, which I might move to being P3 pages...

I guess that the lack of documentation, combined with the significant departure from the "normal" way of doing things in yii is a challenge for me. If there was more info about the overall way things worked - "root nodes" for example, menus and navigation, and how best to integrate non-P3 models/controllers/views into Phundament - then I wouldn't be pounding my forehead on the desk so much!

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

You can link to any controller action with p3pages, see the wiki page mentioned above.

Have you gone through this section and created a root node?

Phundament is Yii, so there's no difference how to integrate models, etc... just add them to your application and call the corresponding actions.
Please also have a look at this gist for an example how to create menu items from a custom model, code could be more sophisticated, though.

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

@dzogchen Did it help?

from app.

schmunk42 avatar schmunk42 commented on August 18, 2024

Closed.
Feel free to reopen if needed.

from app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.