simialbi / yii2-elfinder

This extension integrates the jQuery elFinder into yii2 framework
MIT License
7 stars 5 forks source link

pass params to view #15

Closed paskuale75 closed 2 years ago

paskuale75 commented 2 years ago

Hi @simialbi i'm trying to pass another parameter to the view (where show Elfinder::widget) to get me to print the title of the page but it only works if after loading i refresh the same view, is it a cache problem ?

thanks

simialbi commented 2 years ago

Can't you use $this->title for this purpose?

paskuale75 commented 2 years ago

It's he who I can not customize, I do not know why I see it well only if I update the page, that is, I reload the same page for the second time.

simialbi commented 2 years ago

Hmm... I don't understand what you exactly mean. In the first load of the elfinder page you have one page title and if you reload another? Do you work with Pjax?

paskuale75 commented 2 years ago

When I click on URL ...../default/ationName it open the right view but the title ignored (load default title), only if I refresh with F5 the page I see the title as I writed, maybe pjax issue ?

simialbi commented 2 years ago

Yes, Pjax views don't change the title of the page, beacuase it get's rendered by layout

paskuale75 commented 2 years ago

I can't do without Pjax so no custom title, thanks @simialbi/yii2-elfinder @.***> ;)

Il giorno lun 8 nov 2021 alle ore 11:59 simialbi @.***> ha scritto:

Yes, Pjax views don't change the title of the page, beacuase it get's rendered by layout

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/simialbi/yii2-elfinder/issues/15#issuecomment-963035153, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACMSGVTQN2VEFZVKHZK4LUK6UP5ANCNFSM5HMIUBZQ .

-- Pasquale Pellicani Developer, Cronotime s.r.l.

@.***

www.paskuale.it https://www.facebook.com/pellicani.pasquale.75 https://www.linkedin.com/in/pasquale-pellicani-06397951/ https://twitter.com/pask_75 Create your own email signature https://www.wisestamp.com/create-own-signature/?utm_source=promotion&utm_medium=signature&utm_campaign=create_your_own&srcid=

simialbi commented 2 years ago

What you could do is replace the title by js in rendered ajax view: Something like

document.title = 'My new title';
paskuale75 commented 2 years ago

Thanks 😉 @simialbi/yii2-elfinder @.***>

Il Lun 8 Nov 2021, 12:26 simialbi @.***> ha scritto:

Closed #15 https://github.com/simialbi/yii2-elfinder/issues/15.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/simialbi/yii2-elfinder/issues/15#event-5582216376, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAACMSGOY27MAPIIVE5FDYLUK6XWRANCNFSM5HMIUBZQ .