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

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

Нестандартный вызов модуля, без jdoc:include

Joomla предоставляет возможность использовать свой Joomla Framework API в шаблонах, и вебмастер имеет возможность вывести любые модули CMS в любом месте своего шаблона. Помимо этого, используя нижеприведенный код, можно также вывести модуль Joomla! в любом месте отдельной страницы, не привязывая его к конкретному пункту меню.

Вывод позиции модуля

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

$document   = & JFactory::getDocument();
$renderer   = $document->loadRenderer('modules');
$options    = array('style' => 'xhtml');
$position   = 'article-banners';
echo $renderer->render($position, $options, null);

В $option указываем стиль модуля (raw, xhtml, и т.д.), а также имя позиции для модуля, в данном примере это 'article-banners'.

Вывод одного модуля

Вывод одного модуля реализовать немного сложнее, так как вам придется определить все параметры вручную. Если этого не сделать, то будут использованы параметры установленные в модуле по умолчанию. Вот пример кода для вывода одного модуля:

$document   = & JFactory::getDocument();
$renderer   = $document->loadRenderer('module');
$options    = array('style' => 'raw');
$module     = JModuleHelper::getModule('mod_custom_banners');
$module->params    = "heading=2\nlimit=10";
echo $renderer->render($module, $options);

Здесь мы используем JModuleHelper для загрузки модуля, в качестве параметра передаем ему имя модуля ('mod_comments_comments'). В $module->params устанавливаем параметры модуля в том же формате как они прописаны в файле конфигурации, каждый параметр разделяется символом новой строки \n.

Смотрите также:
Комментарии (74) Добавить комментарий
  • сергей
    сергей
    03 Декабря 2011, 02:04
     ↑  0  ↓     ответ

    а помощь вы оказываете а то я уже заплутался в советах))) смысл заключается в том что в профиле пользователей коминит билдера постоянно то появляются то исчезают модули прям какой то полтергейст )))))

  • Дмитрий
    Дмитрий
    13 Марта 2012, 12:46
     ↑  -2  ↓     ответ

    Полезная заметка! Думаю, подойдёт для применения в каталоге, построенном на zoo.

  • Леонид
    Леонид
    23 Августа 2012, 19:01
     ↑  0  ↓     ответ

    ОГРОМНЫЙ РЕСПЕКТ АВТОРУ !!!

    Замучался системно прописывать позицию для вывода модулей в карточке товара virtuemart

  • Юрий
    Юрий
    01 Ноября 2012, 20:08
     ↑  0  ↓     ответ

    Спасибо, использую!

  • Спасибо
    Спасибо
    29 Декабря 2012, 06:16
     ↑  0  ↓     ответ

    Спасибо, очень помогло!

  • Урмат
    Урмат
    27 Февраля 2013, 17:01
     ↑  0  ↓     ответ

    От души. Огромное спасибо автору.

  • Denis
    Denis
    01 Сентября 2013, 22:50
     ↑  0  ↓     ответ

    Очень помогло, спасибо

  • Андрей
    Андрей
    22 Ноября 2013, 19:07
     ↑  0  ↓     ответ

    Спасибо! То что нужно

  • Yaroslav Royar
    Yaroslav Royar
    04 Декабря 2013, 01:16
     ↑  0  ↓     ответ

    Убил целый день на поиск нужного решения, огромное спасибо!!!!

  • Таир
    Таир
    31 Января 2015, 01:41
     ↑  0  ↓     ответ

    Вы лучшие!

  • Emery
    Emery
    19 Марта 2017, 15:09
     ↑  0  ↓     ответ

    The stretchers forcefully prolong the penis and that is extremely probable to bring about major

    tissue hurt.

  • Sterling
    Sterling
    23 Апреля 2017, 03:24
     ↑  0  ↓     ответ

    Howdy are using Wordpress for your blog platform?

    I'm new to the blog world but I'm trying to get started and set up my own. Do you require

    any html coding knowledge to make your own blog?

    Any help would be really appreciated!

  • clash of clans hack tool
    clash of clans hack tool
    23 Апреля 2017, 07:10
     ↑  0  ↓     ответ

    Thanks very interesting blog!

  • ????????? ????? ??????
    ????????? ????? ??????
    24 Апреля 2017, 06:58
     ↑  0  ↓     ответ

    It's remarkable to visit this site and reading the views of all mates regarding this post, while I aam also keen of getting familiarity.

  • ????? check up
    ????? check up
    03 Мая 2017, 18:30
     ↑  0  ↓     ответ

    WOW just what I was searching for. Came here by searching for ?????

  • автомат Вулкан
    автомат Вулкан
    14 Мая 2017, 18:37
     ↑  0  ↓     ответ

    Wow, fantastic weblog layout! Нow ?ong ?ave you ev?r been running a

    blog f?r? yoou ma?e blogging look easy. Thee eentire glance оf youг webgsite іs magnificent, as neatly

    aas the content!

  • Jewel Supper Star Diamond
    Jewel Supper Star Diamond
    08 Сентября 2017, 05:50
     ↑  0  ↓     ответ

    Wow, wonderful weblog layout! How long have you ever been running a blog for?

    you made blogging look easy. The whole look of your site

    is magnificent, let alone the content!

  • Никита
    Никита
    14 Сентября 2017, 01:16
     ↑  0  ↓     ответ

    спасибо огромное, дай Бог здоровья!!!

  • judi bola
    judi bola
    10 Ноября 2017, 20:31
     ↑  0  ↓     ответ

    What's up, I log on to your blog like every week.

    Your humoristic style is awesome, keep it up!

  • judi online
    judi online
    21 Ноября 2017, 01:12
     ↑  0  ↓     ответ

    Why viewers still make use of to read news papers when in this

    technological world everything is accessible on net?

  • bandar judi online
    bandar judi online
    18 Декабря 2017, 23:15
     ↑  0  ↓     ответ

    Generally I do not read post on blogs, but I would like to say that this write-up very

    pressured me to check out and do it! Your writing taste has been amazed me.

    Thank you, quite nice post.

  • judi bola online
    judi bola online
    19 Декабря 2017, 21:02
     ↑  0  ↓     ответ

    Greetings from Carolina! I'm bored to death at work

    so I decided to browse your site on my iphone

    during lunch break. I enjoy the info you present here and can't wait to take

    a look when I get home. I'm amazed at how fast your blog loaded on my phone ..

    I'm not even using WIFI, just 3G .. Anyways, great site!

  • judi online terbaik
    judi online terbaik
    02 Января 2018, 00:06
     ↑  0  ↓     ответ

    This is my first time visit at here and i am really happy to read everthing at single place.

  • judi bola
    judi bola
    03 Января 2018, 21:45
     ↑  0  ↓     ответ

    hey there and thank you for your info – I have definitely picked up something new from right here.

    I did however expertise some technical points using

    this website, as I experienced to reload the web site many times previous to I could get

    it to load properly. I had been wondering if your web host is

    OK? Not that I'm complaining, but slow loading instances

    times will sometimes affect your placement in google and can damage your

    high quality score if ads and marketing with Adwords.

    Anyway I am adding this RSS to my e-mail and

    can look out for a lot more of your respective interesting content.

    Ensure that you update this again very soon.

  • specadieta.com
    specadieta.com
    06 Января 2018, 09:20
     ↑  0  ↓     ответ

    Superb post however I was wondering if you could write a litte more on this subject?

    I'd be very thankful if you could elaborate a little bit

    further. Bless you!

  • judi online terbaik
    judi online terbaik
    13 Февраля 2018, 12:40
     ↑  0  ↓     ответ

    Hello, I read your new stuff like every week.

    Your story-telling style is awesome, keep it up!

  • aliexpress swimsuit haul
    aliexpress swimsuit haul
    08 Мая 2018, 11:33
     ↑  0  ↓     ответ

    I think the admin of this web pazge is in fact working hard inn support of his

    web site, siince here every stuff is quality based stuff.

  • happytime.kr
    happytime.kr
    01 Июня 2018, 05:58
     ↑  0  ↓     ответ

    Just want to say your article is as amazing. The clearness

    to your submit is simply spectacular and i can assume you are a professional in this subject.

    Well with your permission let me to seize your feed to stay updated with forthcoming post.

    Thank you a million and please carry on the gratifying work.

  • jasa seo terbaik
    jasa seo terbaik
    14 Июля 2018, 05:19
     ↑  0  ↓     ответ

    I could not refrain from commenting. Well written!

  • minecraft
    minecraft
    04 Сентября 2018, 16:51
     ↑  0  ↓     ответ

    Sweet blog! I found it while surfing around on Yahoo News.

    Do you have any tips on how to get listed in Yahoo

    News? I've been trying for a while but I never seem to get there!

    Thanks

  • minecraft
    minecraft
    04 Сентября 2018, 18:08
     ↑  0  ↓     ответ

    I really love your site.. Excellent colors & theme. Did you

    develop this web site yourself? Please reply back as I'm hoping to create my own website and would love to

    find out where you got this from or just what the theme is called.

    Thanks!

  • minecraft
    minecraft
    04 Сентября 2018, 18:15
     ↑  0  ↓     ответ

    Article writing is also a excitement, if you know

    after that you can write otherwise it is complicated to write.

  • minecraft
    minecraft
    04 Сентября 2018, 18:21
     ↑  0  ↓     ответ

    Very descriptive blog, I loved that bit. Will there be a part 2?

  • minecraft
    minecraft
    04 Сентября 2018, 18:32
     ↑  0  ↓     ответ

    I visited multiple web pages but the audio quality

    for audio songs present at this web page is really superb.

  • minecraft
    minecraft
    04 Сентября 2018, 18:56
     ↑  0  ↓     ответ

    Hey! This post could not be written any better! Reading this post reminds me

    of my good old room mate! He always kept chatting about this.

    I will forward this page to him. Fairly certain he will

    have a good read. Many thanks for sharing!

  • minecraft
    minecraft
    05 Сентября 2018, 07:23
     ↑  0  ↓     ответ

    Do you mind if I quote a couple of your posts as long as I provide credit

    and sources back to your blog? My website is in the exact same area of interest as yours and my users would truly benefit from

    some of the information you provide here. Please let me

    know if this okay with you. Thanks a lot!

  • minecraft
    minecraft
    05 Сентября 2018, 10:54
     ↑  0  ↓     ответ

    Wow that was odd. I just wrote an extremely long

    comment but after I clicked submit my comment didn't appear.

    Grrrr... well I'm not writing all that over again. Anyways, just wanted to say excellent blog!

  • minecraft
    minecraft
    21 Сентября 2018, 17:58
     ↑  0  ↓     ответ

    Hi! Someone in my Myspace group shared this site with us so

    I came to check it out. I'm definitely enjoying

    the information. I'm book-marking and will be tweeting this to my followers!

    Exceptional blog and superb design.

  • Italy - Greece
    Italy - Greece
    21 Декабря 2018, 01:33
     ↑  0  ↓     ответ

    What a stuff of un-ambiguity and preserveness of valuable knowledge on the topic of unpredicted feelings.

  • gudangmp3.top
    gudangmp3.top
    30 Января 2019, 05:33
     ↑  0  ↓     ответ

    Attractive portion of content. I just stumbled upon your weblog and in accession capital to

    say that I get in fact loved account your blog posts. Anyway I'll

    be subscribing in your feeds or even I success you get right of entry to persistently rapidly.

  • nail salon
    nail salon
    01 Мая 2019, 23:12
     ↑  0  ↓     ответ

    I think this is among the most significant info for

    me. And i'm glad reading your article. But want

    to remark on few general things, The website style is great, the articles is really great : D.

    Good job, cheers

  • breda administration
    breda administration
    07 Мая 2019, 22:45
     ↑  0  ↓     ответ

    Have you ever considered about adding a little bit more than just your articles?

    I mean, what you say is valuable and everything.

    But just imagine if you added some great pictures or videos to give your posts more,

    "pop"! Your content is excellent but with images and video clips, this

    site could definitely be one of the most beneficial in its niche.

    Wonderful blog!

  • Footjob
    Footjob
    11 Мая 2019, 05:25
     ↑  0  ↓     ответ

    Write more, thats all I have to say. Literally, it seems

    as though you relied on the video to make your point.

    You clearly know what youre talking about, why throw away your intelligence on just posting videos

    to your weblog when you could be giving us something enlightening to read?

  • payroll administration breda
    payroll administration breda
    18 Мая 2019, 18:22
     ↑  0  ↓     ответ

    Everyone loves it when folks get together and share views.

    Great blog, continue the good work!

  • gamefly free trial
    gamefly free trial
    22 Мая 2019, 04:47
     ↑  0  ↓     ответ

    My coder is trying to persuade me to move to .net from PHP.

    I have always disliked the idea because of the

    expenses. But he's tryiong none the less. I've been using Movable-type on various websites for about a year and

    am anxious about switching to another platform.

    I have heard very good things about blogengine.net. Is there a way I can transfer

    all my wordpress posts into it? Any help would be greatly

    appreciated!

  • how to get help in windows 10
    how to get help in windows 10
    23 Мая 2019, 20:52
     ↑  0  ↓     ответ

    I must thank you for the efforts you have put in writing this site.

    I'm hoping to check out the same high-grade blog posts from you in the future as well.

    In truth, your creative writing abilities has encouraged me to get my very own blog now ;)

  • website marketing
    website marketing
    05 Июня 2019, 06:00
     ↑  0  ↓     ответ

    Terrific work! This is the type of information that are meant to be shared across the net.

    Shame on the search engines for no longer positioning this publish higher!

    Come on over and visit my site . Thank you =)

  • is.gd
    is.gd
    13 Июня 2019, 09:15
     ↑  0  ↓     ответ

    Definitely believe that which you stated. Your favorite reason seemed to be on the web the easiest thing

    to be aware of. I say to you, I certainly get annoyed while people consider worries that they plainly don't know about.

    You managed to hit the nail upon the top as well as defined

    out the whole thing without having side-effects ,

    people can take a signal. Will probably be back

    to get more. Thanks

  • SME Breda
    SME Breda
    10 Июля 2019, 14:23
     ↑  0  ↓     ответ

    I really like reading an article that can make people think.

    Also, thank you for allowing me to comment!

  • Hemorrhoids Tips
    Hemorrhoids Tips
    03 Августа 2019, 14:00
     ↑  0  ↓     ответ

    I do not know if it's just me or if perhaps everybody else

    experiencing problems with your blog. It appears as though some of the text in your posts

    are running off the screen. Can someone else please provide feedback and let me know if this is

    happening to them too? This could be a issue with my browser because I've had this happen previously.

    Thanks

  • How Do You Get Hemorrhoids
    How Do You Get Hemorrhoids
    09 Августа 2019, 17:22
     ↑  0  ↓     ответ

    I'm not sure the place you're getting your information, but

    great topic. I must spend a while learning much more or figuring out more.

    Thanks for fantastic information I was on the lookout for this info for my mission.

  • What Are Hemorrhoids
    What Are Hemorrhoids
    20 Августа 2019, 08:28
     ↑  0  ↓     ответ

    Since the admin of this web site is working, no uncertainty very soon it

    will be well-known, due to its quality contents.

  • How Long Do Hemorrhoids Last
    How Long Do Hemorrhoids Last
    21 Августа 2019, 21:12
     ↑  0  ↓     ответ

    For most recent information you have to visit internet and

    on the web I found this website as a best web site for most up-to-date updates.

  • Thin Bowel Movements and Hemorrhoids
    Thin Bowel Movements and Hemorrhoids
    23 Августа 2019, 22:28
     ↑  0  ↓     ответ

    I don't even understand how I stopped up right here, but I assumed this submit was once great.

    I do not recognise who you might be however certainly you're going to a well-known blogger if you are not already.

    Cheers!

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

    I am truly happy to glance at this weblog posts

    which contains tons of useful data, thanks for providing

    these kinds of information.

  • coconut oil with
    coconut oil with
    16 Ноября 2019, 04:03
     ↑  0  ↓     ответ

    This is very interesting, You're a very skilled blogger.

    I've joined your feed and look forward to seeking more of your fantastic post.

    Also, I've shared your site in my social networks!

  • tinyurl.com
    tinyurl.com
    21 Ноября 2019, 09:03
     ↑  0  ↓     ответ

    When someone writes an paragraph he/she keeps the idea of a user in his/her brain that how a user can understand it.

    So that's why this piece of writing is perfect. Thanks!

  • tinyurl.com
    tinyurl.com
    22 Ноября 2019, 09:19
     ↑  0  ↓     ответ

    I don't even know the way I stopped up here, but I assumed this submit was once great.

    I don't understand who you are but definitely

    you're going to a well-known blogger if you happen to are not already.

    Cheers!

  • http://tinyurl.com/quest-bars-cheap-44820
    http://tinyurl.com/quest-bars-cheap-44820
    24 Ноября 2019, 06:07
     ↑  0  ↓     ответ

    Highly descriptive post, I liked that bit.

    Will there be a part 2?

  • http://tinyurl.com/r9v3bpc
    http://tinyurl.com/r9v3bpc
    25 Ноября 2019, 01:24
     ↑  0  ↓     ответ

    Touche. Sound arguments. Keep up the great work.

  • coconut oil are
    coconut oil are
    25 Ноября 2019, 17:27
     ↑  0  ↓     ответ

    Hey there! I just wanted to ask if you ever have any issues with hackers?

    My last blog (wordpress) was hacked and I ended up losing several weeks of hard work due

    to no backup. Do you have any solutions to prevent

    hackers?

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

    Good way of explaining, and pleasant article to obtain facts

    concerning my presentation subject matter, which i am going to convey in institution of higher education.

  • ps4 games
    ps4 games
    29 Ноября 2019, 02:40
     ↑  0  ↓     ответ

    Wonderful blog! I found it while browsing on Yahoo News.

    Do you have any tips on how to get listed in Yahoo News?

    I've been trying for a while but I never seem to get there!

    Cheers

  • quest bars cheap
    quest bars cheap
    30 Ноября 2019, 13:03
     ↑  0  ↓     ответ

    Thanks for any other informative website. The place else may just I am getting that type of information written in such a perfect approach?

    I have a venture that I'm simply now running on, and I have been at the look out for such info.

  • ps4 games
    ps4 games
    30 Ноября 2019, 17:09
     ↑  0  ↓     ответ

    Hey there! This is kind of off topic but I need some advice

    from an established blog. Is it very hard to set up your own blog?

    I'm not very techincal but I can figure things out pretty fast.

    I'm thinking about making my own but I'm not

    sure where to start. Do you have any ideas or suggestions?

    Thanks

  • quest bars cheap
    quest bars cheap
    02 Декабря 2019, 10:02
     ↑  0  ↓     ответ

    This info is worth everyone's attention. When can I find

    out more?

  • quest bars cheap
    quest bars cheap
    02 Декабря 2019, 16:00
     ↑  0  ↓     ответ

    Can I simply say what a comfort to discover somebody that really

    knows what they are talking about online. You actually realize how

    to bring a problem to light and make it important. More people

    ought to read this and understand this side of the story.

    It's surprising you aren't more popular since you most certainly have the gift.

  • quest bars cheap coupon twitter
    quest bars cheap coupon twitter
    03 Декабря 2019, 07:32
     ↑  0  ↓     ответ

    This paragraph provides clear idea for the new viewers of

    blogging, that actually how to do blogging.

  • quest bars cheap coupon twitter
    quest bars cheap coupon twitter
    04 Декабря 2019, 01:45
     ↑  0  ↓     ответ

    Hello! Quick question that's totally off topic.

    Do you know how to make your site mobile friendly?

    My web site looks weird when browsing from my apple iphone.

    I'm trying to find a template or plugin that might

    be able to fix this problem. If you have any recommendations, please

    share. Many thanks!

  • ps4 games
    ps4 games
    06 Декабря 2019, 09:11
     ↑  0  ↓     ответ

    I have to thank you for the efforts you have put in penning

    this blog. I am hoping to see the same high-grade blog posts by you in the future as well.

    In fact, your creative writing abilities has

    encouraged me to get my own, personal blog now ;)

  • ps4 games
    ps4 games
    06 Декабря 2019, 16:42
     ↑  0  ↓     ответ

    Hmm is anyone else encountering problems with the pictures on this blog loading?

    I'm trying to figure out if its a problem on my end or

    if it's the blog. Any feed-back would be greatly

    appreciated.

  • ps4 games
    ps4 games
    06 Декабря 2019, 17:01
     ↑  0  ↓     ответ

    I am really enjoying the theme/design of your site. Do you ever run into any browser compatibility issues?

    A small number of my blog visitors have complained about my blog not operating

    correctly in Explorer but looks great in Safari. Do you have any recommendations to help fix this

    problem?

  • quest bars cheap
    quest bars cheap
    07 Декабря 2019, 17:07
     ↑  0  ↓     ответ

    Why visitors still use to read news papers when in this technological world the whole thing is available on net?

  • quest bars cheap
    quest bars cheap
    09 Декабря 2019, 19:08
     ↑  0  ↓     ответ

    Hi there, of course this post is really fastidious and I have learned lot of things from it

    concerning blogging. thanks.

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




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

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