Framework7 - URL Query


Advertisements

Description

If you are using Template7 for rendering Ajax pages, its context always will be extended with special property url_query which contains URL GET arguments as shown below −

index.html
<a href = "projects.html?pname = XYZ&duration = 12months&cost = 500000" 
   class = "item-link item-content">Project</a>

projects.html

<div class = "page" data-page = "person">
   <div class = "page-content">
      <div class = "content-block">
         <div class = "content-block-inner">
            <p><b>Project working on :</b> {{url_query.pname}}</p>
            
            <b>Duration :</b> {{url_query.duration}}</p>
            
            <p><b>Cost :</b> {{url_query.cost}}</p>
         </div>
      </div>
   </div>
</div>
framework7_template7_pages.htm
Advertisements