RSS   Twitter   Copiny   Copiny
Нашел ошибку? 

Выдели фрагмент текста с ошибкой или неточностью и нажми Ctrl+Enter!

Наложение стилей в модулях

Практически в каждом из модулей существует опция - Суффикс класса модуля. Обычна эта опция позволяет обрамить вывод модуля в контейнер(ы) с индивидуальным классом, для удобства наложения стилей CSS. Не плохо было бы если и наш модуль будет поддерживать суффикс CSS класса.

Как вы понимаете, объявляется опция через xml-файл модуля:

<param name="moduleclass_sfx" type="text" default="" 
       label="Module Class Suffix" description="PARAMMODULECLASSSUFFIX" />

Использовать суффикс класса в коде можно следующим образом:

$mcsuffix = trim($params->get("moduleclass_sfx"));

И теперь выводим модуль с соотвествующим обрамлением:

# Вывод ссылки и анонса
echo "\n<p class=\"ranlatest".$mcsuffix."\">".$pptext."</p>";
echo "\n<p class=\"ranlatest".$mcsuffix."\"><a class=\"ranlatest".
    $mcsuffix."\""."href=\"".$link."\">".$rows[$ranitem]->title."</a></p>";

Согласитесь, что подобный код не дает нам большой гибкости. Как только возникнет вопрос о том, чтобы один и тот же модуль отобразился дважды с разной версткой возникнут некоторые сложности. В следующией статье мы рассмотрим основные вопросы шаблонизации модуля.

Смотрите также:
Комментарии (17) Добавить комментарий
  • tinyurl.com
    tinyurl.com
    23 Ноября 2019, 23:12
     ↑  0  ↓     ответ

    Very good post! We are linking to this particularly great content on our

    site. Keep up the great writing.

  • tinyurl.com
    tinyurl.com
    24 Ноября 2019, 14:58
     ↑  0  ↓     ответ

    What's up everyone, it's my first go to see at this website, and article is actually fruitful in favor of me, keep up posting such articles.

  • coconut oil was
    coconut oil was
    25 Ноября 2019, 22:12
     ↑  0  ↓     ответ

    Excellent blog here! Also your web site quite a bit up fast!

    What host are you the use of? Can I get your associate hyperlink to your host?

    I want my site loaded up as quickly as yours lol

  • plenty of fish dating site
    plenty of fish dating site
    26 Ноября 2019, 12:03
     ↑  0  ↓     ответ

    Hi there to every body, it's my first visit of this web site; this weblog consists of amazing and in fact fine information in support of

    visitors.

  • http://tinyurl.com/yd22esmt
    http://tinyurl.com/yd22esmt
    26 Марта 2022, 11:25
     ↑  0  ↓     ответ

    Hmm is anyone else experiencing problems with the images on this blog loading?

    I'm trying to determine if its a problem on my end or if it's the blog.

    Any suggestions would be greatly appreciated.

  • tinyurl.com
    tinyurl.com
    27 Марта 2022, 12:39
     ↑  0  ↓     ответ

    I think this is one of the most important information for me.

    And i'm satisfied reading your article. However want to

    remark on some basic things, The site taste is perfect, the articles is

    truly great : D. Good activity, cheers

  • tinyurl.com
    tinyurl.com
    28 Марта 2022, 11:18
     ↑  0  ↓     ответ

    Way cool! Some extremely valid points! I appreciate you writing this article and the rest of the website is also very good.

  • best rates on airfare
    best rates on airfare
    02 Апреля 2022, 22:20
     ↑  0  ↓     ответ

    I loved as much as you will receive carried out right here.

    The sketch is attractive, your authored subject matter stylish.

    nonetheless, you command get bought an edginess over that you wish be delivering the following.

    unwell unquestionably come more formerly again as exactly the same nearly very often inside case you

    shield this increase.

  • airline tickets best price
    airline tickets best price
    03 Апреля 2022, 09:36
     ↑  0  ↓     ответ

    This is a very good tip particularly to those new to the blogosphere.

    Brief but very accurate information… Many thanks for sharing this one.

    A must read post!

  • cheap flights tickets
    cheap flights tickets
    04 Апреля 2022, 18:14
     ↑  0  ↓     ответ

    Do you have any video of that? I'd want to find out some additional information.

  • cheapest flight tickets
    cheapest flight tickets
    05 Апреля 2022, 06:51
     ↑  0  ↓     ответ

    You're so awesome! I don't suppose I have read through something like that before.

    So good to find somebody with genuine thoughts on this subject matter.

    Seriously.. thanks for starting this up. This website is one thing that's needed on the internet,

    someone with a bit of originality!

  • fly tickets
    fly tickets
    05 Апреля 2022, 18:10
     ↑  0  ↓     ответ

    Quality posts is the key to interest the visitors to

    pay a visit the web page, that's what this web page

    is providing.

  • air tickets
    air tickets
    06 Апреля 2022, 09:36
     ↑  0  ↓     ответ

    I do agree with all of the ideas you've presented for your

    post. They're very convincing and will certainly work. Still, the posts are too brief

    for beginners. May just you please prolong them a

    little from next time? Thanks for the post.

  • best way to book flights
    best way to book flights
    06 Апреля 2022, 16:35
     ↑  0  ↓     ответ

    When someone writes an piece of writing he/she retains the image

    of a user in his/her mind that how a user can know it.

    Thus that's why this paragraph is perfect.

    Thanks!

  • gamefly
    gamefly
    07 Апреля 2022, 08:48
     ↑  0  ↓     ответ

    Hola! I've been reading your weblog for a while now and

    finally got the bravery to go ahead and

    give you a shout out from Kingwood Tx! Just wanted to tell you keep up the

    good job!

  • gamefly
    gamefly
    11 Апреля 2022, 01:41
     ↑  0  ↓     ответ

    I don't know if it's just me or if everybody else experiencing problems

    with your site. It looks like some of the text within your posts are running off the

    screen. Can somebody else please provide feedback and let me know if this is happening to them as well?

    This may be a issue with my web browser because I've had this happen before.

    Kudos

  • tinyurl.com
    tinyurl.com
    10 Мая 2022, 10:07
     ↑  0  ↓     ответ

    With havin so much written content do you ever run into any issues of plagorism or copyright infringement?

    My website has a lot of unique content I've either written myself or outsourced but it appears a lot of it is popping

    it up all over the internet without my authorization. Do you know any techniques

    to help stop content from being ripped off?

    I'd definitely appreciate it.

Оставить комментарий




* обязательно для заполнения

1 введенный почтовый адрес используется только для обратной связи при ответах в комментариях и сервиса gravatar.com
.