Skip to content

news url #4645

Answered by 3l3ktr0n
3l3ktr0n asked this question in Q&A Plugins
Dec 31, 2021 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

Well it's nothing special actually. I was hoping the url just needs category_id and category_sef.. so I added them to the array.

function sc_news_title()
    {
        if($parm == 'no_url') { return $this->var["news_title"]; }
        if($parm == 'sef') { return $this->var["news_sef"]; }

        $urlparms = array(
            'news_id'     => $this->var["news_id"],
            'news_sef'    => $this->var['news_sef'],
            'category_id'   => $this->var['category_id'],
            'category_sef'  => $this->var['category_sef'],
        );

        return "<a href='".e107::getUrl()->create('news/view/item', $urlparms)."'>".$this->var["news_title"]."</a>";

Later on made a query with J…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Moc
Comment options

Moc Jan 2, 2022
Maintainer

Comment options

You must be logged in to vote
1 reply
@Jimmi08
Comment options

Answer selected by Moc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants