[Dev] Building a dashboard and other stuff
  • First, I tried to use zula_snippet to reduce body text for article, in articles index,
    but it braked the layout, any idea?
    Why not add to zula common an function to only show first paragraph?so we would
    have an option of only to show number of caract or 1st paragraph.

    Second how would you build a dashboard to be loaded instead of modules manager?

    My idea was having a layout that would accept multiple sections, that we could reorder in
    our taste, but doing this would need to save the info into the db.
    So using content_layout, we would duplicate the layout and set the url to admin/, then setting
    some sections for it, am I going in the right direction? Dashboard has no main content, so wouldn't
    have SC, but only, S1, S2, S3, etc.

    Permissions - We have rules to roles and users to roles, why not users to rules to?
    because we can have a member that have more permissions that the group is in but less
    then the group above.

    we need more docs :(

    how would I load session login for admin without default layout?

    Stay well
  • I've notice another thing that is needed,
    When we add layout you get only two sections, top bar and sidebar,
    how can we add more sections to it?
  • Another question, how would a hook be set to an section?
    Is there a way for doing this?
  • Morning,

    First, I tried to use zula_snippet to reduce body text for article, in articles index,
    but it braked the layout, any idea?
    Why not add to zula common an function to only show first paragraph?so we would
    have an option of only to show number of caract or 1st paragraph.

    How do you mean it broke the layout, can you be more descriptive in this? As for showing the first paragraph, sort of however creating a snippet of an article is actually quite hard, due to the fact it can contain HTML and other special characters that take up length, but are not visible. So you can't just take a substring. For this reason we have the 'Insert Page Break' button in the WYSIWYG editor (next to the undo/redo icons), placing this in will cut the article short when viewing all of them but display the full article when viewing just this one.

    My idea was having a layout that would accept multiple sections, that we could reorder in
    our taste, but doing this would need to save the info into the db.
    So using content_layout, we would duplicate the layout and set the url to admin/, then setting
    some sections for it, am I going in the right direction? Dashboard has no main content, so wouldn't
    have SC, but only, S1, S2, S3, etc.

    You would have to create a new module called 'dashboard' and attach that as the main content in the 'admin' layout (currently show as the 'SC' sector). What sort of things would be added to the dashboard? Would it be things such as existing modules that you can currently attach to sectors?

    Permissions - We have rules to roles and users to roles, why not users to rules to?
    because we can have a member that have more permissions that the group is in but less
    then the group above.

    You mean to edit the permissions for a single user? It is technically already possible, just there is no interface to do this as I can't think of a way to easily display it to the user.
    we need more docs

    Yep, we sure do. I have a lot of work to do currently and it just keeps getting pushed back.

    how would I load session login for admin without default layout?

    Simply go to http://example.org/session (or index.php?url=session if using standard router).

    When we add layout you get only two sections, top bar and sidebar,
    how can we add more sections to it?

    Take a look at ./assets/themes/carbon/sectors.xml - this describes which sectors a theme has, and then edit the main_template.html of a theme to add in the {S3}, {S4} tags etc.

    Another question, how would a hook be set to an section?
    Is there a way for doing this?

    How do you mean? You want a hook to add content to an existing section, or do a single controllers/modules output?
  • 1st didn't know about page break, thanx :)

    2nd ya can get what you say when not getting how to show the options for user - rules

    3rd just saw the new version at github and the new option for default module, so
    my goal is to build a dashboard, where there will have hooks that loads info from modules,
    so I have multple sections and those sections get info from the hooks, hope you can get what i'm
    saying =)

    The thing here is that we are strict to use the default theme since we can't change it, for example, if I have
    a 3 column with equal width, there's no SC, but when going to some module action we can have a different
    layout with just two columns, so my idea was when cloning an layout we could edit it to our taste, probably i'm thinking in
    the wrong way...and just playing with the css I can get this using the layout / (url/regex) right?

    Ya, I already saw how to manually change sectors, but would be good to have an interface where we could
    edit the theme and sector xml to add or modify it, maybe i'll try to do something about this, the base its in tango already
    since we can edit css files.

    4th when I say session login without theme, is loading only a screen with a form, isn't there a option for
    $this->setLayout or $this->useLayout that could be set false, that way only loads the view for login.
    if you do http://www.site.com/session or http://www.site.com/admin/session it always shows an theme.

    5th when using zula_snippet the sidebar goes underneath content, doesn't stay on the right. at least its what's
    happening with me :)


    I'm still learning the core and its functions and have a lot of ideas for tango, hope you can be patient :P

    Stay well
  • 2nd ya can get what you say when not getting how to show the options for user - rules

    Sorry I don't understand this, can you explain further?

    The thing here is that we are strict to use the default theme since we can't change it, for example, if I have
    a 3 column with equal width, there's no SC, but when going to some module action we can have a different
    layout with just two columns, so my idea was when cloning an layout we could edit it to our taste, probably i'm thinking in
    the wrong way...and just playing with the css I can get this using the layout / (url/regex) right?

    You can change the theme for both 'main' and 'admin' site type. It's in the 'theme' module where you change your main theme. I have a few ideas for what you've said, which would include having the ability for multiple modules attached to 'SC' - with various styles, such as 3 column. Technically yes you can do this with layouts currently using regex like you said - and a few more sectors added to your theme. The regex would be '^$' to match the homepage

    Ya, I already saw how to manually change sectors, but would be good to have an interface where we could
    edit the theme and sector xml to add or modify it, maybe i'll try to do something about this, the base its in tango already
    since we can edit css files.

    No, it's a technical limitation that the main_template.html file can not be edited through TangoCMS its self - due to how the sectors work. When you display the content of main_template.html in a text area for example, the '{S1}' etc tags get replaced by TangoCMS. So it's not possible to do this.

    4th when I say session login without theme, is loading only a screen with a form, isn't there a option for
    $this->setLayout or $this->useLayout that could be set false, that way only loads the view for login.
    if you do http://www.site.com/session or http://www.site.com/admin/session it always shows an theme.

    Yes, every module can do this already. When a HTTP request is made and contains the header 'X-Http-Requested-With' with a value of 'XMLHttpRequest' only the output of the module/controller will be displayed. Which is very handy for 'AJAX Requests'.

    5th when using zula_snippet the sidebar goes underneath content, doesn't stay on the right. at least its what's
    happening with me

    Most likely because it has split the HTML markup of the article - this is why displaying the first 150 chars or 1st paragraph is a lot harder than it sounds.
  • You mean to edit the permissions for a single user? It is technically already possible, just there is no interface to do this as I can't think of a way to easily display it to the user.

    Why not use a dropdown module list in user edit/create, when selecting the module it would call the table for module permissions.

    Add-on/Feature:
    - Make menu available by url/regex or using install.xml
    Usually we have modules menu inside SC, but if we want it in sidebar?how should we do it?
    It's not pratical by creating a new menu and even that we can't set it to appear only in the module config page

    - SC sections would be a 5* add on, I'm really missing it.

    Other thing i've noticed is that there are modules that don't disappear from module manager view, when they should, for example
    i've set group writers to only have permission to articles module, but when log in in they can see some modules in module manager, because
    they need "Global Permission". Probably part of this will be fixed in github version, since we can load different module in main page.

    - Another good add on would be if we can set different module to load in main page by groups/permission, this would be fixed if we had sub sections.
    what do i mean by this?for example we have admin group and in dashboard he can see some sections only available for admins, if we have writers
    he would only see stuff like latests comments, new articles, etc.

    Hope you get my ideas.

    Stay well
  • Again in menu module, when we build a multi level menu, usually the parent is a no target name, when we create
    a menu in menu/config/add, leaving the url empty, the href should be replaced by an # instead of base url or shouldn't
    set an <a href> value.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion