1
alain01
Customize Blocks and smarty variable
  • 2020/1/11 18:21

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


Hi,
i have added some code full bootsrap4 in my theme.tpl file in my theme.
All is ok
But now, i want to move this code from theme.tpl to customize blocks.

All is the same except smarty variables.

in my theme.tpl :
<img class="mb-1" src="<{$xoops_imageurl}>images/logo-xoops.png" alt="<{$xoops_sitename}>" width="200px">


but if i put this code in customize block, the block cant interpret smarty variable.

May be it's a noob question...
Is it possible to use "assign" function in customize blocks like in theme.tpl ?
For example, in theme.tpl, i use
<{xoMemberInfo assign=member_info}>
and
<{xoInboxCount assign="unread_count" total='inbox_total'}>
.

Sure, i can put Hard link in my block but i hate that,
i can put absolut link too (/themes/mytheme/images/) but it's bad too.

I want used a smarty variable to extract the path theme..
SO
How ?
Thank you in advance !

Alain

2
geekwright
Re: Customize Blocks and smarty variable

There is no variable processing inside custom HTML blocks. Smarty, and all of its functions, is not available.

There is one replacement that can help in any custom blocks. The code:
{X_SITEURL}
will be replaced with the XOOPS_URL with a trailing slash. You can use that to build URLs for pages or sites.

I have used that to more easily move things from a development system to a production environment, without making changes.

Long term, the next generation XOOPS has shortcodes which will be available in almost any context. That will provide a more complete and extensible solution.

3
alain01
Re: Customize Blocks and smarty variable
  • 2020/1/12 8:54

  • alain01

  • Just can't stay away

  • Posts: 528

  • Since: 2003/6/20


Haaaaa,
{X_SITEURL} !!!

Sure, thank you, it works like i want.
Quote:
I have used that to more easily move things from a development system to a production environment, without making changes.
Yes, exactly

Haaaa, shortcodes,
I remember this news, now !
I was so happy to read this very good news !
It's a very powerful and amazing new fonction !
Again 1 time, i'm unpatient to use the 2.6 version in stable and production stage...

Login

Who's Online

166 user(s) are online (100 user(s) are browsing Support Forums)


Members: 0


Guests: 166


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits