Announcement

Collapse
No announcement yet.

Are 'Sub Fragments' possible?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Are 'Sub Fragments' possible?

    I am trying to create a brochure page with fragments that, within the one brochure page, can be placed into 'sub-brochure pages'. An example would be:-

    Garages (main brochure page)
    Cars (sub-heading)
    Ford Garage, Dublin - go to website (individual fragment)
    Renault Garage, Dublin - go to website (individual fragment)
    Citroen Garage, Dublin - go to website (individual fragment)
    Vans (sub heading)
    Ford Garage, Dublin - go to website (individual fragment)
    Renault Garage, Dublin - go to website (individual fragment)
    Citroen Garage, Dublin - go to website (individual fragment)

    etc...

    Any help gratefully received.
    Chris
    Chris Adams

    #2
    the easiest way I know of doing this is to create a new fragment and then hard code the web address link into it.
    then simply open a new fragment in the brochure page, put nothing in it other that the title, and then change the layout to "the ford garage", or "the renault garage" etc.

    you could have one single fragment and then use a variable with the dropdown options, - then you would change the layout to "garage web link" and change the drop down choice to "ford" or "renault" etc.

    Comment


      #3
      Thanks for your reply Kevin, unfortunately I need to be able to give this to a client who will be able to (simply) add new fragments that hold FragmentTitle / Text & Link that then sit within each (relevant) sub-heading... I think I understand your way of doing it but without knowing the actual urls that the client will be needing to populate with in the future I wouldn't be able to set it up as you say.
      If you or anyone else has any further ideas then i'd be most grateful - i had thought to hardcode the menu, linking the garages to a product section (named garages) that then can have products separated by fragments... but this is a bit of a long-winded way of doing it...
      Chris
      Chris Adams

      Comment


        #4
        cheat a bit,
        create a fragment layout called "the-garage-link"
        then create a simple layout using the Fragment-link-text to say "Nissan" or "Renault" and then the Fragment-link-url to give the actual url

        Code:
         <a href="<actinic:variable name="FragmentLinkedItemID" />">
        <actinic:variable name="FragmentLinkText" /> Garage, Dublin - go to website</a>
        it would then be up to them to
        • create a new fragment
        • change the layout to xxx
        • Tick the Link checkbox
        • Add the word "Nissan" or "Renault" or "Ford" to the Link text
        • add the full URL to the URL box of the fragment

        at the end of the day, there is only so much hand-holding you can do and sometimes, the user must get his hands dirty with cutting and pasting the url etc

        I have in the past used the Fragment text to do the list of url's
        let the user enter
        Cars
        Ford~Dublin~http://url....
        Renault~Dublin~http://url....
        Nissan~Dublin~http://url....
        then within your fragment, you could use a simple bit of php to extract each line, de-piece the Ford and the Dublin and the url and then format the words back into the required listing.
        this way, the user can then put as many lines of garages as he wants and you simply take them and reformat them.
        if you do it right, you could make the first line of the textbox to say "Cars" or "Vans" and then format lines 2-... as the links
        a new fragment would then do the vans

        hope it all makes sense

        Comment

        Working...
        X