Copy link to clipboard
Copied
Hi I trying to add a nav to my email campaigns with a web app.
I've added a Text (hyperlink) field in my webapp titled "navUrl" but I dont want the link and {tag_navUrl_nolink} or {tag_navUrl_value} wont work.
this is what im trying to achieve:
<table class="menu">
<tr>
<td>
<table>
<tr>
<th class="menu-item"><a href="{tag_navUrl_nolink}">{tag_name_nolink}</a></th>
<th class="menu-item"><a href="http://mywebsite.businesscatalyst.com/index.htm">Home</a></th>
</tr>
</table>
</td>
</tr>
</table>
I know i can use the Text (string) field but it gives more chance of the client stuffing it up if they are typing out a link rather then just selecting.
thanks
Luke
Use liquid instead which will render in the layouts called in a web app. I gather with the above on module_webapps you have template="" so liquid will render in that then through to the email.
Copy link to clipboard
Copied
is this possible or is their no tag that will work with campaigns?
Copy link to clipboard
Copied
Where do you have the code?
If that is not inside the web app layout then it wont work because it needs the reference.
You also need an absolute url to work for your campaigns.
Copy link to clipboard
Copied
I have the code in my email-webapp-nav.tpl layout
<th class="menu-item"><a href="{tag_navUrl_nolink}">{tag_name_nolink}</a></th>
and in my template
<table class="menu">
<tr>
<td>
<table>
<tr>
{module_webapps id="33863" filter="all" template="/Layouts/Email/email-webapp-nav.tpl"}
</tr>
</table>
</td>
</tr>
</table>
everything works fine with the layout its just the {tag_navUrl_nolink} is not working but
{tag_navUrl} is?
Copy link to clipboard
Copied
Use liquid instead which will render in the layouts called in a web app. I gather with the above on module_webapps you have template="" so liquid will render in that then through to the email.
Copy link to clipboard
Copied
Liam you are a bloody legend!!
I thought it would effect the ICE editor so didn't even think about it.
<th class="menu-item"><a href="{{navurl}}">{{name}}</a></th>
This worked.
Thanks mate I'm going to be broke by the amount of beers I owe you!
Copy link to clipboard
Copied
If you did a normal layout I think it would have worked fine. But through a custom template, I think as part of the liquid rendering from a layout to work in an email campaign may have had some knock on effects. But liquid does work here so should be all good.
Copy link to clipboard
Copied
well after all that I couldn't get the email to be responsive because BC was changing my code once I pasted it into the portal newsletter templates. Many hours wasted but its ok Adobe my time isn't important. I just don't understand how the editor hasn't been updated yet or an option to place my code without it being "fixed"
Copy link to clipboard
Copied
We have several responsive elements.
If it is changing your code, considering your email needs to be based around XHTML strict (of which the editor in the portal will follow) there will be likely issues and errors in there Luke that the editor is trying to handle and not able too.
So in this case that is actually an important thing, if it IS breaking for an email, the email actually needs to be changed otherwise it is a sure bet it wont be working in a number of email clients, Outlook's being the main one.
Copy link to clipboard
Copied
ok thanks Liam I think i'm just going to avoid putting nav type links into email for now and go over everything i've done to check for errors, thanks for your help anyway buddy really appreciate it!!
Copy link to clipboard
Copied
Nav type links are totally fine, but again it is based on what are you trying to do in terms of the code.