Forum
Auto Insert URLS in Templates
I a have a template that uses a select menu to choose a URL for a button in a region. Looks like this:
<a href="<perch:content id="usp-link" type="select" options="* Please Select URL|,Brochures|brochures,Contact Us|/contact" allowempty="false" required="true" label="Page Link" />">
Is there any way to draw the URL list from the pages that exist in Perch? And any way to auto capitalise the name shown in the list like "Brochures|brochures.php"?
And if I am only using Perch navigation for certain pages in the site that use master templates to create pages from inside Perch is there a way to combine hard coded urls in this list with ones created by Perch?
I'm not really sure what you mean, but could the
pagelist
field type be a solution?Okay I have a template that has a button to click to take you to a page. In the template I used the above code to create a select menu in admin to choose the url. Presently I have to hard code the page urls in. If I have some dynamically created pages done through Perch using a master template how would I get these in this select menu?
It does sound like the
pagelist
field type. Did you have a look at it?Can you point me to docs on this as could not find it?
Hi Nigel,
I believe my issue is similar to yours. I'm attempting to add a "Read More" link to featured items on my home page. This would then take the user to the full post from another section of the site using a perch template.
Let me know if you find a solution.
This is the section I'm browsing at the moment: https://docs.grabaperch.com/docs/templates/attributes/type/
Best, Tommy
Haven't gotten it working for myself yet but this may help: https://docs.grabaperch.com/docs/templates/attributes/type/dataselect/
Still working on it over here. @Drew, just wanted to bring to your attention that the docs need a minor update on this page: https://docs.grabaperch.com/docs/templates/attributes/type/dataselect/
In the example, hidden="true" should be changed to suppress="true"
Let me know if either of you find a solution. I'll keep you posted as well.
Still need to know where to find docs on the page list function Drew mentioned please.
Also with the previous forum you could subscribe to a topic so you got emailed when a post was answered but I cannot see if this is possible in the new forum, please advise?
There isn't anything more to it than is listed on the download page.
>
As mentioned in the thread about the new forum this is something we are going to add.
Ah I see its an add-on, did not know that which is why I could not find it! I thought it was a field type.
And thanks for clearing up about forum thread subscription.