Question

I use Joomla 3.2.1. I create a new template and add some configuration parameter.

Now I need in my advanced configuration a selection, where I can set the menu assignment for a slideshow in my template. The Slideshow is html / javascript (jquery). I can enable/disable it in configuration.

But I want to assign it to menu item. Is there a configuration parameter type for this? I couldnt find.

my configuration looks like:

<config>
    <fields name="params" >
        <fieldset name="advanced">
            <field type="spacer" label="Slideshow" />

            <field name="isSlideshow" type="radio"
                class="btn-group btn-group-yesno"
                default="1"
                label="Slideshow">
                <option value="1">JYES</option>
                <option value="0">JNO</option>
            </field>

      <!-- add menu assingment-->
            <field type="menut assignment???"....>

            <field name="slide1" type="media" default=""
                label="Slide 1"/>
            <field name="slide2" type="media" default=""
                label="Slide 2"/>
            <field name="slide3" type="media" default=""
                label="Slide 3"/>

        </fieldset> 
    </fields>
</config>
Was it helpful?

Solution

You should create a module with the slideshow code. Then assign the module to a position in your template, where you will include the position:

<jdoc:include type="modules" name="slideshow" />

Install the module in the slideshow position, then in the module settings, tab "Menu Assignment", choose "Only on the pages selected"; below you can tick the menu items you want it to show on.

Joomla 3.2, but 2.5 is much the same

There are a few cases where this is not sufficient, i.e. in the blog view the articles will share the same menu item, but you might want to treat them differently. You have many options here, the best is to create a different - named position in the template, and assign the modules to the appropriate one, i.e.:

<jdoc:include type="modules" name="slideshow-all" />
<jdoc:include type="modules" name="slideshow-articles" />
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top