1

What I use:
- Version 2.5
- gantry framework

Need:
I must place in my homepage a slideshow module inside the mainbody as a featured article.

What I did:
Installed a slideshow module and placed temporary inside gantry's maintop-a position to see if it worked (it did), then moved in a non-previously-exsisting 'slideshow' position.

Created a new article, with this content: {loadposition slideshow} and set it to featured state.

Result:
the article was published correctly but the introtext char limit trimmed the actual module code to 100 chars making it useless.

What I already tried to fix the issue:

  • Modified my slideshow article from database adding the loadmodule code in the fulltext field (which was originally empty),
    then modified components/com_content/view/featured/tmpl/default_item.php replacing echo $this->item->introtext; with an if to identify my slideshow article id then query the database to find the fulltext field and echo it. this thingy works but the loadmodule function isn't, so it's displayed as simple HTML. I deduce that introtext is treated differently than fulltext since what's inside the brackets is interpreted as code only when echoed as introtext, and I miss that layer.

  • Modified modules/mod_articles_category/helper.php to break the 100 introtext_limit, sadly finding that's not called for my featured articles (added dump($item, 'some name') which returns only the articles that are inside my news sidebar, even if all my featured articles including slideshow are categorized)

  • tried a million different combinations of the above (i.e.:{loadmodule slideshow}
    {module [myslideshow_article_id]} <- a module loader plugin i tried, ...) which are too long to put here.

  • Searched the whole project folder for files containing 'introtext' inside their code, finding alot, but nothing that actually trims it (except helper.php of course)

  • Searched the Joomla API

  • Googled for everything that came into my mind finding no working solutions.

  • Came Here :)

Thanks

2 Answers 2

2

Your requirement is not clear. If you wish to add a slideshow in a module in a featured article, look into Modules Anywhere by the fellow at NoNumber. In this case, you would include your module inside a featured article to show the slides.

2
  • my requirement is in strong text... predeeded by a "Need:". btw if you read carefully you can see i'm able to load the module but it gets trimmed by the introtext Nov 5, 2014 at 10:03
  • That may be, but nonumber modules anywhere tends to succeed where loadposition falls short. I'd try it.
    – Faye
    Nov 7, 2014 at 20:00
0

Your main article might contain a readmore tag before the loadposition code you're adding. Check the source code of your article (press the < > button if you're using TinyMCE) and look for the following code in your article:

<hr id="system-readmore" />

This is where Joomla should end the intro text. Make sure the {loadposition slideshow} code is found before the readmore tag. Try placing it before any text in your article, to see if it shows up.

Where does the 100 characters intro text limit come from? Are you using K2 or another CCK, or is it plain Joomla? Joomla itself should not crop your intro text, neither by character nor word count, unless your template has some kind of override for this.

Update: I see no reason why what you're trying to do shouldn't work, Joomla has no character limit for the intro text by default, it can be as long as you want.

Unless it has to be a featured article, and you're displaying other articles on the same page, try displaying the article using a "Single Article" menu item, or maybe "Category blog".

You say the module works fine when published to a regular module position, so I assume the module itself is working. Have you checked if your article contains any Have you checked if your article contains open HTML tags? (e.g. a <div> without a closing </div>)?

Another test is to create a new article, add {loadposition slideshow} (and nothing else) in the text, and set it as featured.

9
  • nope, i'm not using a CCK, just plain Joomla. Btw, firebug shows me only the initial lines of the Javascript function called by the module, inside the introtext div, but it gets trimmed at 100 chars.. Even the other featured articles I have are affected by this, the global char limits are 500 in the administration panel. Nov 5, 2014 at 10:24
  • I mean, even if the char limit is set to 500 the text gets trimmed to 100, I modified every aspect of this in the admin panel, so i guess there's a forced-by-code limit for featured articles.. Nov 5, 2014 at 11:18
  • Where exactly do you find and set this character limit? AFAIK there is no such function in Joomla by default, because the intro-text ends where you insert <hr id="system-readmore" />. I have updated the answer with a couple of suggestions. Are you able to provide a link to your site?
    – johanpw
    Nov 6, 2014 at 23:09
  • I cannot pass a link due to customer's privacy policy. function bind() in Joomla's core it's where that split is happening... but since the text is like 20 chars long (the loadmodule text) there should be no reason to trim it. Nov 7, 2014 at 1:48
  • 1
    mod_article is not a default Joomla module, I assume you're using this module. So you're using a module to load an article with a module inside? Sounds complicated. Why don't you use the Featured articles menu item?
    – johanpw
    Nov 7, 2014 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.