snooky147 VIP
Total posts: 19
02 Апр 2014 15:57

Hi, I'd like to know where I can modify and if I can modify separately for each artcle, the class as there is this line in record's template :

<article class="<?php echo $this->appParams->get('pageclass_sfx')?><?php if($item->featured) echo ' article-featured' ?>">

So, where adding or modifiing pageclass_sfx ? Can we change it for each record ?

Thanks

Последние изменения: 04 Апр 2014


Sergey
Total posts: 13,748
03 Апр 2014 06:37

pageclass_sfx is a standard menu parameter. It is the same for every article. If you want different class for every article just add there

<article class="article-<?php echo $item->id; ?>...

snooky147 VIP
Total posts: 19
03 Апр 2014 07:26

Thanks, on my test site, the class is empty, so where is defined this class ? type, section, submit form ? Thanks


Sergey
Total posts: 13,748
03 Апр 2014 07:45

On what page are you planning to change class? List of articles or article full view?

And what for?


snooky147 VIP
Total posts: 19
03 Апр 2014 07:57

Article full view for customising background


Sergey
Total posts: 13,748
03 Апр 2014 11:21

You want different background for every article? based on ID?


snooky147 VIP
Total posts: 19
03 Апр 2014 12:23

I think, I'll add a radio field where user can choose background for their record. So, I put values like classname<im src=..../> in radio field and then in template, I remove html tags from field result to new variable and can use <article class="<?php echo '$newvariable'" ?> ...something like this ..


Sergey
Total posts: 13,748
04 Апр 2014 05:46

I see. Got you.

Cool idea.

Работает на Cobalt