cancel
Showing results for 
Search instead for 
Did you mean: 

Adding url parameter to Web Page Composer page URL?

Former Member
0 Kudos

I want to add a dynamic Visual Composer iview to a Web page composer page. The iview is to display a dataset from a SQL-query based on a URL parameter value. The URL parameter hence needs to be added to the WPC page url.

The value of the parameter needs to be set for the page (or for the article that is published on the page) by the editor of the page.

Any tips?

Now for the case: I am to create a simple "learning solution" with course booking and administration in our portal. I am thinking of creating a course catalog in WPC where the administrators add one course description article per page. The course has a unique course ID that the administrator adds to the article or page somehow...? On the same page there is placed a visual composer iview that displays all the dates that the course in question is held, and also a button per date that triggers a sign up form.

The VC iview queries the course database where each course holds the same course ID as is to be set for the WPC page. For this to happen the iview needs the page parameter described earlier.

Creating the VC iview is no problem - the issue in question is how to integrate it with a WPC page with a page URL parameter.

Regards

Henning Strand

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

as far as I understand relation page-course is 1-1 and is fixed. Means page only shows one course and it is set when the page is created. In terms of that there is no dynamic content except what the vc iview shows.

So, I think the easiest way for you would be if you integrate your VC iviews by invoking them by url i.e. wrapping them in URL ivew. You would have to create URL iview for each of your courses (and set the right course id in the url). And then place those iviews in corresponding to courses pages.

There could be nicer solution but would require creating of custom editor component (i.e. some coding in java).

Hope that gives a good start.

best,

--epexpert

Former Member
0 Kudos

epexpert

Your assumptions on the 1:1 relationship between course description and page is correct. Your URL iview solution is also viable with the assumption that a new URL iview needs to be created for every new course added.

This is not, though, an acceptable solution. A course admin needs to be able to administrate the course catalog without having to create new iviews. (The PCD is off limits) If there was a way to auto-add the needed URL parameter based on a value entered in the WPC page/article setup, then all that's needed for the admin is to add and publish new WPC pages.

Regards

Henning

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Henning,

here comes another idea that will make author's life a bit easier. You can make a custom web form and in the corresponding xsl hard code a reference to the VC iview and so when the xsl gets executed it'll construct the the full url including the parameter. The cource id the author will enter in a pure text field that will be nowhere displayed in the end form it'll only find its place within the iview url.

Hope that gives you anpther good option.

Best regards,

--epexpert

Former Member
0 Kudos

Again, thanks for answer. This is more like it!

It seems to me that this has to be the way to go. Now, do you have any references to blogs or documentation on how to do this? Setting up the form itself should be OK, but I would need help on how to construct the URL from the XSL. Of course this has to be a mash up of the standard URL parts that WPC needs, and the add ons that the VC iview needs.

Regards

Henning