Skip to content

Link form the model #3

@luizpicolo

Description

@luizpicolo

The link to the news should be modified as the user's needs. Today the link is fixed by the name of 'noticias', but it could be anything, 'Blog', "Texts". We should have a way so that the route could follow the name defined in the model. Example:

If model is Blog

element += '<a href="/blog/' + ui.item.content_builder_category.slug + '/' + ui.item.slug + '" class="cb-relational__link" target="blank"></a>';

if model is Text

element += '<a href="/texts/' + ui.item.content_builder_category.slug + '/' + ui.item.slug + '" class="cb-relational__link" target="blank"></a>';

of course, all dynamically without changing the name manually
https://github.com/luizpicolo/rails_admin_content_builder/blob/master/app/assets/javascripts/rails_admin/content_builder.js.erb#L468

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions