Giter Club home page Giter Club logo

Comments (4)

mlantz avatar mlantz commented on June 14, 2024

There is a minor issue if you're using custom templates for the menu, if you use the @menu('main') without a custom view then it works fine, but the links were not translated if you used the custom view. I've corrected that and will be pushing a solution shortly.

from cms.

RushabhJoshi avatar RushabhJoshi commented on June 14, 2024

https://screenshots.firefox.com/TDXAR463tXy8WEjs/blog.laravel.local

I have removed the custom template and used @menu('main') not it is not showing menu either
see the screen shot now about menu item is missing
it is not even in page source

from cms.

RushabhJoshi avatar RushabhJoshi commented on June 14, 2024

I don't know how you going to do this but there is a little correction in TranslationRepository

this is my code snippet

`public function findByEntityId($entityId, $entityType)
{
    $item = $this->model->where('entity_type', $entityType)->where('entity_id', $entityId)->first();

    if ($item && $entityType == 'Grafite\Cms\Models\Link') {
        return $item->data;
    }

    if ($item && ($item->data->is_published == 1 || $item->data->is_published == 'on') && $item->data->published_at <= Carbon::now(config('app.timezone'))->format('Y-m-d H:i:s')) {
        return $item->data;
    }

    return null;
}`

Though there is no published_at or is_published field in links we need to by pass this check

from cms.

ddjikic avatar ddjikic commented on June 14, 2024

@RushabhJoshi
change the template to use
<li class="nav-item"><a class="nav-link" href="{{ url(''.$link->page->translation(config('app.locale'))->data->url) }}">{{ $link->translation(config('app.locale'))->data->name }}</a></li>

from cms.

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.