xoops forums

sova

Not too shy to talk
Posted on: 2013/12/29 7:03
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#1

use smartys in theme

Why not make use of smartys in the themes?
For example:
we're calling The News Title in the themes
or
we're calling text (in module) in the themes
Without using the Modules block!
How do we do it?

it used In most other CMS. (WordPress, Joomla, Drupal and ...)

Bleekk

Theme Designer
Posted on: 2013/12/29 13:24
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#2

Re: use smartys in theme

xoops is using smartys in the theme.
there are global smartys and you can use module smartys in the theme but only isnide the module

sova

Not too shy to talk
Posted on: 2013/12/29 18:13
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#3

Re: use smartys in theme

Quote:

Bleekk wrote:
xoops is using smartys in the theme.
there are global smartys and you can use module smartys in the theme but only isnide the module


How to use this smartys in Outside the module? (For example: in Home page theme)
calling The News Title in the Home page and Outside the News module.(Without using the Modules block!)

heyula

Theme Designer
Posted on: 2013/12/29 20:49
heyula
heyula (Show more)
Theme Designer
Posts: 471
Since: 2008/4/24
#4

Re: use smartys in theme

Hi @Sova

http://www.xuups.com/modules/publisher/item.php?itemid=10

sova

Not too shy to talk
Posted on: 2013/12/30 8:37
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#5

Re: use smartys in theme

thank you heyula

display = 'title' -> shows just title
display = 'none' -> renders the block but does not display it
options = 'enter|block|options' -> overwrites block default options
groups = 'enter|allowed|groups' -> overwrites block default group view permissions
cache = 3600 -> overwrite cache time(in seconds)

and for show just image or show just text?

It's also used
<{block id=31 groups="1|2|3" cache=20}>

But I mean was not this!
For example:
in Latest News Block:
we can calling just the news title, Not block Title.(or just news image) Without using the Modules block

sova

Not too shy to talk
Posted on: 2014/1/1 19:02
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#6

Re: use smartys in theme

Who can not help me?

Bleekk

Theme Designer
Posted on: 2014/1/1 21:55
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#7

Re: use smartys in theme

there are no predefined smartys so you can only get article image of a certain article.
all you can do is use php in the theme and get all the stuff you want

sova

Not too shy to talk
Posted on: 2014/1/2 6:55
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#8

Re: use smartys in theme

This is what I've mentioned above, the most common use of the solar system
All systems go for the user's convenience
You can compare the position of these systems:
Wordpress vs. XOOPS
Joomla vs. XOOPS
PHP-Nuke vs. XOOPS (PHP-Nuke is a source of XOOPS)
12 years wasn'' t Time low?
XOOPS is still not as pervasive as in other systems.

What is our sin that we love XOOPS? And we do not know programming!

But I know someone does not answer my questions

===============
Excuse me to All.
I can not speak English well.
I get help from Google Translate.

Bleekk

Theme Designer
Posted on: 2014/1/2 10:00
Bleekk
Bleekk (Show more)
Theme Designer
Posts: 934
Since: 2002/12/14
#9

Re: use smartys in theme

sry but you have a special wish. I would really like to know the exact scenario where you need it.
you can not have one smarty for all modules. every module handles article images in different way.

in publisher you have a smarty for the article images. I am not sure of the name but let's say it is <article.image>.
take a unused publisher block and edit the template. delete everything except <article.image>
then take a unused block position and place it in the theme where you want to have the article image. activate the block in this block position

sova

Not too shy to talk
Posted on: 2014/1/4 4:24
sova
sova (Show more)
Not too shy to talk
Posts: 149
Since: 2010/4/13
#10

Re: use smartys in theme

Thank you Dear Bleekk
But I just did exactly the same thing
The problem is here:
Sometimes it's necessary to put a block used in several places, But in different ways.
In such situations it is best to use the Smarty

How to use these in Theme?
<{$item.title}>
<{$item.text}>
<{$newitems.poster}>
<{$article.image}>

can I use this code in Theme?
<{foreach item=newitems modules=publisher}>
Or something similar

===============
Excuse me to All.
I can not speak English well.
I get help from Google Translate.