oc-shopaholic / oc-good-news-plugin

📰 News (blogging) plugin for October CMS
https://octobercms.com/plugin/lovata-goodnews
GNU General Public License v3.0
25 stars 10 forks source link

cant change the url depending of the website languaje slug #35

Open DPTOProgramacionIslaNetworks opened 2 years ago

DPTOProgramacionIslaNetworks commented 2 years ago

Hi, im having issues with this plugin, i have rainlab translation and it seems like this plugin supports it when changing title, description and other fiends, but it does not seem to support multiple urls depending of the languaje url like,
websiteurl.com/title <--- default languaje english websiteurl.com/es/titulo websiteurl.com/de/titel

i hope this issue can be solved

DPTOProgramacionIslaNetworks commented 2 years ago

and also i cant access the urls of the articles of this plugin in the url section i tried saving /first-article , first-article , websiteurl.com/first-article , websiteurl.com/en/first-article
and not a single one made the article to show on the web, in any url tested,

igor-tv commented 2 years ago

Hi,

You can make the URL field translatable by extending the Article model through your plugin. For example, add the following code to your plugin's boot() method:

    /**
     * Plugin boot method
     */
    public function boot()
    {
        \Lovata\GoodNews\Models\Article::extend(function ($obArticle) {
            $obArticle->translatable[] = 'slug';
        });
    }
DPTOProgramacionIslaNetworks commented 2 years ago

thanks i tried that, and yes, now is translatable , but, i still getting the issue of not being able to navigate to the urls i created for the articles, like websiteurl.com/article1 Captura2

igor-tv commented 2 years ago

Have you read the plugin documentation? I need to see your CMS-page code where you display articles to tell you more.

igor-tv commented 2 years ago

Hi, im having issues with this plugin, i have rainlab translation and it seems like this plugin supports it when changing title, description and other fiends, but it does not seem to support multiple urls depending of the languaje url like, websiteurl.com/title <--- default languaje english websiteurl.com/es/titulo websiteurl.com/de/titel

i hope this issue can be solved

By the way, there is a setting to enable URL translatability (Settings > Misc > Application settings)

Снимок экрана 2022-06-28 в 16 15 06

.