We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13460
    • 47 Posts
    Okay lads,

    How can I get getResources to this; A container with FURL as container.html and it's child-docs as named links like container.html#child

    physical resource-hierarchy

    homepage
    container
    |--- child-a
    |--- child-b
    |--- child-c
    |--- child-d
    |--- and_so_on
    something
    contact
    


    image of resource-structure


    Currently I've done the following with my a href in my Tpl but that doesn't work quite right;
    					<article class="span4"><!-- start of module -->
    						<div class="icon">
    							<div id="[[+link_attributes]]" class="img"></div>
    						</div>
    						<div class="module-text">
    							<h2>[[+pagetitle]]</h2>
    							<p>[[+content:striptags:ellipsis=`100`]]</p>
    							<a class="align-right" href="[[~5]]#[[+alias]]">lees meer ></a>
    						</div>
    					</article><!-- / end of module -->
    


    How can I accomplish that with getResources (and possible also in Wayfinder)? [ed. note: jambek2003 last edited this post 13 years, 10 months ago.]
      UI /UX designer + bit of Front-End Developer. Getting around with MODx Revolution
      • 13460
      • 47 Posts
      anybody?
        UI /UX designer + bit of Front-End Developer. Getting around with MODx Revolution
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        I'm not sure what you are trying to do. Named anchors (IDs can also be used with any HTML elements) provide the anchor location, then URLs with the # provide links to that anchor location.

        So to begin with, you need to have the anchor itself, then you need to have URLs with the # tag to direct to the desired anchor location on the desired page.

        Can you provide a link to a page with something like what you are trying to do?
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org
          • 13460
          • 47 Posts
          Quote from: sottwell at Dec 03, 2012, 03:01 AM
          I'm not sure what you are trying to do. Named anchors (IDs can also be used with any HTML elements) provide the anchor location, then URLs with the # provide links to that anchor location.

          So to begin with, you need to have the anchor itself, then you need to have URLs with the # tag to direct to the desired anchor location on the desired page.

          Can you provide a link to a page with something like what you are trying to do?

          I've got the named-anchors, actually I use ID's on the heading but that is fine too for xHTML/HTML5. I've got one page with multiple resources in it done by getResources. each child-resource should get a id which is actually the link_attribute of the resource. Now I want the container to be the html-document and the child-resources to be the named-anchors. e.g. Resource(12) with link_attr personalsite should be rendered as url www.example.com/modules.html#personalsite. I got this working by a ugly hack
          <a class="align-right" href="[[~5]]#[[+link_attributes]]">
          . What is the proper way to achieve this?!

          EDIT: Made possible te render a FURL like www.example.com/modules.html#personalsite the 'container' modules not be a container. And childs of modules are still [[+link_attributes]] [ed. note: jambek2003 last edited this post 13 years, 10 months ago.]
            UI /UX designer + bit of Front-End Developer. Getting around with MODx Revolution