Re-use large number of assets


(Cwhitbourn) #1

Hi,


I work for University offering a large number of courses. In our Squiz Matrix system, each course has it's own parent asset and number of children assets to create a set of webpages for each course.



We currently publish this course information on our main website. We also now want to publish a subset of this information for each course on our mobile website, which is in Matrix as a seperate site.



I am trying to work out the best way of publishing the single set of course information in both places.



I could just link all the course assets in both places, but for the mobile set, we only actually require the parent asset and none of the children. Is there a way to link parent assets but not children?



Alternatively, is there a way of keeping the course assets in a single site, and just presenting them as part of the mobile site, with mobile URLs, without actually linking the assets in both places in the asset tree? - some kind of dynamic referencing?



Thanks in advance,

Cade


(Robin Shi) #2

Hi Cade,


If you don't mind the appearance of the URL, you can use the URL like below,

    http://www.mobilesite.com/yourMobilePage/?a=coursePageId

The course page will be rendered by the design applied to

    http://www.mobilesite.com/yourMobilePage/


Robin

(Scott Hall) #3

Beware the use of asset id as a query to load a page. You'll experience caching issues, or lack thereof with matrix cache and you're also exposing the asset id.


I take it the biggest issue is bringing in the content and ensureing designs/layouts don't conflict?



Have a look at the REST asset (maybe nested REST?) and when you call the resource pass a dynamic design query through to ensure the resonse does not load with the original design, say a 'body' only design?



Cheers



Scotty


(Cwhitbourn) #4

Thanks Scott. I've tried REST assets for printing the entire contents of the page, but what we really need to do is access the metadata only from the original asset and print that as a new mobile-specific page into a new paint layout.


So is there a way of using the REST asset to access the metadata from the original asset and use the normal metadata keyword replacements in the paint layout to print the metadata in the page?


(Cwhitbourn) #5

Just had another idea that might work - using an alternate design, similar to a print friendly version of the page, but in this case, a mobile friendly version i.e. ?SQ_DESIGN_NAME=mobile and update the user defined design and lookup settings accordingly.


Any concerns with this approach?


(Rhaggith) #6

[quote]
Just had another idea that might work - using an alternate design, similar to a print friendly version of the page, but in this case, a mobile friendly version i.e. ?SQ_DESIGN_NAME=mobile and update the user defined design and lookup settings accordingly.



Any concerns with this approach?

[/quote]



Just off the top of my head;


  • Hyperlinks in the content that branch off from that page but do not contain the design name query string
  • Anything in the design related to asset lineage might break, maybe even stuff like the site name in the globals, etc
  • If there are metadata schemas that are required (say you are pulling in custom scripts/css via metadata) then doing so might create clashes on the original page



    Hey Scott - curious as to how Dynamic REST resource is set up, is it on the manuals page? I couldn't see it, but then I'm pretty sure I'm going to need glasses soon.



    Also, probably a dumb question, but exposing asset ids to the public… big issue? Can anyone elaborate?

(Cwhitbourn) #7

Thanks rugi. I'm going to try the '&SQ_ACTION=set_design_name' trick in order to make sure the design doesn't reset.


(Scott Hall) #8

Hey Rugi, you can find info about REST asset at http://manuals.matrix.squizsuite.net/web-services/chapters/rest-resource-assets/


There is a couple of flavours, the JavaScript version allows you to process the response with javaScript server side before it is displayed in the browser. Provides a fair bit of flexibility for creative web dev solutions without having to get too crazy (if at all) with custom backend work.



Cheers



Scotty