Forum
Link displaying double quote mark & angle bracket on page.
I've copied the link structure from this page and just changed the label tag. But it's displaying "> on the page. Any idea what I'm doing wrong? Code below.
<a href="https://<perch:content id="url" type="text" label="Instagram link" replace="https://|" />"></a>
What is "it" in this context?
The it is the double quote & angle bracket. Anything between the end of the perch content tag and the closing anchor tag is being displayed, so i have "> appearing on my web page.
Where is it being displayed?
Where the link is output.
So this...
Becomes this...
Does the edit form work ok?
Goodness, you're working late! No, it hasn't shown up in perch yet. Whole template below...
Hello Mark,
There seems to be something strange in this bit of code:
Viewing it in your original post of your code, the section id="url" has two differently-colored quotes. I'd expect the ensuing type="text" to have the word type colored the same as the previous id, but it's not.
Any idea what's going on there?
Hi John
I hadn't noticed that. That's the way the snippet I copied from this page in the perch docs appears.
I think the different coloured quotes are just as code editors will see you're closing off the first set of quotes i.e href=""
You have PHP in your template which shouldn't be there, not sure whether that's the issue though.
Is this page code or template code? Which file is it in?
Ah, no it's the footer file in the
perch/templates/layouts
folder. That's why the template tag isn't working as it's not in a template... Gets coat